Skip to content

Feature/add components count on item cards#39

Merged
ivan-risueno merged 8 commits into
masterfrom
feature/add-components-count-on-item-cards
Jul 3, 2026
Merged

Feature/add components count on item cards#39
ivan-risueno merged 8 commits into
masterfrom
feature/add-components-count-on-item-cards

Conversation

@ivan-risueno

Copy link
Copy Markdown
Contributor

No description provided.

if (hasComponentCount) {
this.filteredProducts = [...this.filteredProducts.map(product => ({
...product,
tags: hasComponentCount

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are inside an if for when it has componentCount, so the ternary here is not needed, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread src/styles.scss Outdated
appshell-product-view-screen.owner-view appshell-chip:first-child mat-chip.appshell-chip {
--mdc-chip-elevated-container-color: var(--appshell-color-grey-warm) !important;
--mdc-chip-elevated-disabled-container-color: var(--appshell-color-grey-warm) !important;
--mdc-chip-label-text-color: var(--appshell-color-grey-warm-contrast) !important;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the figma, the text color should be "--appshell-color-grey-strong"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread src/styles.scss
--mdc-dialog-container-shape: 0px;
}

appshell-product-catalog-screen.owner-view appshell-chip:first-of-type mat-chip.appshell-chip,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple of thoughts about this, not required to be changed, just questions to consider (can have a no for answer):

  1. Why adding it in the global styles instead of in each component's styles (with ViewEncapsulation.None). If placed there it is isolated in the component and easy to understand where the style comes from.
  2. If staying here, could be simplified to a single selector by removing the first parts and starting from .owner-view ... ? Despite working I have doubts which approach would be better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, suggestions and questions are more than welcome, and I'm always open for discussions 😊:

  1. I've put the styles at a global scope since we're using the appshell as an extermal library, not styling our own components. It's like a convention.
  2. It could be simplified, but I chose to make it more explicit just to make sure that, if in any future the owner-view css class is used somewhere else, this styling won't affect that new usage. This is the point of writing all the selectors, we're targeting only those chip cards.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@ivan-risueno ivan-risueno merged commit 0c59281 into master Jul 3, 2026
2 checks passed
@ivan-risueno ivan-risueno deleted the feature/add-components-count-on-item-cards branch July 3, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants