Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS-8749] View More tags button no longer shows when all tags are removed from a node #10200

Closed

Conversation

swapnil-verma-gl
Copy link
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)
View more button was not getting hidden when all tags were removed from a node

What is the new behaviour?
View more button now gets hidden

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:
https://hyland.atlassian.net/browse/ACS-8749

@@ -26,7 +26,7 @@
<button
data-automation-id="adf-dynamic-chip-list-view-more-button"
mat-button
[hidden]="!limitChipsDisplayed"
[hidden]="chipsToDisplay.length === 0 || !limitChipsDisplayed"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could go with < 2? Since it still doesn't make too much sense to show it when there is only one tag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The chipsToDisplay property only contains the chips that are to be currently displayed, not all chips that are present. By default, it will always have a length of at least 1, so that at least a single chip is shown. So having a check against < 2 will cause problems as it will hide the button in case the container is so small that only a single chip can be shown. See below video -

chips-to-display.mp4

Copy link

sonarcloud bot commented Sep 16, 2024

@swapnil-verma-gl
Copy link
Contributor Author

Closing this PR in favour of #10221. This PR has got some rebase issue, and is showing more files than what were originally changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants