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-8918] search date filter changing between created and modified tabs slides the text inside the tabs too #10455

Conversation

AleksanderSklorz
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)
https://hyland.atlassian.net/browse/ACS-8918

What is the new behaviour?
Text is not sliding when tabs are switched for date filter.

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:

@AleksanderSklorz AleksanderSklorz marked this pull request as ready for review December 3, 2024 14:52
@AleksanderSklorz AleksanderSklorz changed the title Acs 8918 search date filter changing between created and modified tabs slides the text inside the tabs too [ACS-8918] search date filter changing between created and modified tabs slides the text inside the tabs too Dec 3, 2024
Copy link
Contributor

@nikita-web-ua nikita-web-ua left a comment

Choose a reason for hiding this comment

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

can you resolve the sonar cloud issues please?

Copy link

sonarqubecloud bot commented Dec 4, 2024

@AleksanderSklorz
Copy link
Contributor Author

can you resolve the sonar cloud issues please?

done

private readonly intersectionObserver = new IntersectionObserver(
(entries) => {
if (!entries[0].isIntersecting) {
this.tabGroup.selectedIndex = (this.selectedIndex + 1) % this.tabsContents.length;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to set this.tabGroup.selectedIndex twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is some angular material problem when we use tabs together with some kind of overlaps like on below screenshot. Basically the problem is following:
When we close this popup then seems like Tabs component becomes broken because after reopening popup Tabs component doesn't know on which tab it was before closing so when we try to switch tab we can see for a moment strange text sliding effect.
To resolve that problem I wrote code which observes for hiding/showing component and I do single switching of tabs so Tabs component can restore it's state. It seems like only solution for that problem, because we can't just "destroy" tabs component and recreate it because we need to keep previous state.

image

@AleksanderSklorz AleksanderSklorz merged commit 88eb654 into develop Dec 5, 2024
18 checks passed
@AleksanderSklorz AleksanderSklorz deleted the ACS-8918-Search-Date-Filter-Changing-between-Created-and-Modified-tabs-slides-the-text-inside-the-tabs-too branch December 5, 2024 07:26
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.

4 participants