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

feat(demo): add responsive step demo #112

Closed
wants to merge 1 commit into from
Closed

feat(demo): add responsive step demo #112

wants to merge 1 commit into from

Conversation

flang
Copy link
Contributor

@flang flang commented Jan 22, 2024

Example demonstrates how to use responsive step feature and how to hide the grid when all columns are hidden

Close #95

Copy link
Member

@javier-godoy javier-godoy left a 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.

@flang
Copy link
Contributor Author

flang commented Jan 23, 2024

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
Copy link

sonarcloud bot commented Jan 23, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@javier-godoy
Copy link
Member

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).

@flang
Copy link
Contributor Author

flang commented Jan 23, 2024

In that case I'd create an opt-in feature to hide the grid when all columns are hidden.

@javier-godoy
Copy link
Member

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.

@flang flang marked this pull request as draft January 23, 2024 17:58
@flang flang closed this Jan 23, 2024
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.

Show Grid once ResponsiveStep applies
2 participants