-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(demo): add responsive step demo #112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem in #95 is that, whatever the initial configuration of the Grid (as reported, "all columns invisible"), the changes from the responsive step will only be applied after the client-side has measured the component, causing a certain flickering.
If visibility: hidden
works (since you use that in the example, I guess it does), the Grid should be first rendered with visibility: hidden
until the component is measured.
I think hiding the grid when all columns are hidden shouldn't be addon responsibility. It's user choice whether hiding the grid or not by add a listener when a responsive step event is triggered. User should also take care of the initial flickering if decied to hide the grid in any step. |
Example demonstrates how to use responsive step feature and how to hide the grid when all columns are hidden Close #95
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Placing the responsibility on the addon for managing grid visibility makes the implementation more convenient for users. It abstracts away the complexity of handling grid visibility and flickering, making the addon more user-friendly. Users can focus on defining responsive steps and let the addon take care of the details. Having the addon manage grid visibility ensures consistency across different implementations. It also makes the codebase more maintainable and less error-prone. If each user had to manually handle grid visibility, it could lead to varied implementations and potential issues. Moreover, it's not that they "decide to hide the grid in any step", but that there will always be flickering in some device (thus any use of the feature would have to implement the workaround in order to prevent flickering). |
In that case I'd create an opt-in feature to hide the grid when all columns are hidden. |
But the issue has never been "hide the grid when all columns are hidden" but "Show Grid once [the first] ResponsiveStep applies". Regardless of how you configure the responsive steps, there will be some flickering until the first responsive step applies. |
Example demonstrates how to use responsive step feature and how to hide the grid when all columns are hidden
Close #95