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

[✨] option to disable CLS warn #4773

Closed
genox opened this issue Jul 10, 2023 · 9 comments · Fixed by #6427
Closed

[✨] option to disable CLS warn #4773

genox opened this issue Jul 10, 2023 · 9 comments · Fixed by #6427
Labels
COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it COMP: DX Developer Experience related issue STATUS-2: waiting for community PR TYPE: enhancement New feature or request

Comments

@genox
Copy link

genox commented Jul 10, 2023

Is your feature request related to a problem?

Not related to an issue.

Describe the solution you'd like

I would much prefer the display of borders around objects to be opt-in, rather than a default.

flag in the Vite config?

Describe alternatives you've considered

there are no alternatives.

Additional context

When working on a design, having random red borders pop up doesn't help much and is distracting.

I get why it is there and I am sure it is a great way to diagnose slow speeds or layout jiggling, but it should be up to me wether I am in debug mode or wether I just want to focus on design.

At least in my case, they are not consistent either, sometimes a block is affected, sometimes not. This is visually very annoying.

@genox genox added TYPE: enhancement New feature or request STATUS-1: needs triage New issue which needs to be triaged labels Jul 10, 2023
@jessezhang91
Copy link
Contributor

We just ran into this as well and I just put up a PR with this flag.

@Hades32
Copy link

Hades32 commented Jul 29, 2023

This is the first and ONLY match on Google when searching for "quick cls". These even appear when just playing with the sample code and it's really not obvious what's going on...

@wmertens
Copy link
Member

wmertens commented Jan 6, 2024

Is this still problematic?

@genox
Copy link
Author

genox commented Jan 6, 2024

Generally speaking, I wholeheartedly support the nudge to think about optimization and CLS is ugly and preventable, no doubt about that. Still, I like to have some level of control over this, as I prefer to decide myself when in the process I will take care of an optimisation issues.

Like with the useVisibleTask$ discouragement: Yes, I know it can be bad and it is a last resort but there is also the fact that I might not have the time to tackle each case right now and for that, I can disable the eslint warning on case by case basis. It is up to me, it is my responsibility in the end.

Real world example: I wrote a 24k loc qwik frontend for ecommerce and it gets complicated.. I resorted to useVisibleTask in 2-3 places because it was the only way to get a feature working for now. I am perfectly aware that it is discouraged, but I also have a deadline and need to move on and decide to come back later and a solution might very well cause a medium sized refactoring that simply isn't possible right now.

There are also some complicated grid views and a few generated responsive pages for which I currently do not have a solution on how to handle some limited cls issues. Same thing: I just dont have the time right now and there are other priorities.

The thing is, in the end, the functionality and the resulting app still works perfectly fine but Qwik makes the assumption that everybody is chasing metrics at all times.

The only thing I am asking is to have an option to decide myself. On the other hand, as humans do, I also became quite efficient at simply accepting the fact that there are some exclamation marks and I have more important things to solve for the time being, so I just move on. :-)

@wmertens
Copy link
Member

wmertens commented Jan 6, 2024

I suppose we can have an option to disable it in the qwik vite plugin. PRs welcome

@wmertens wmertens added COMMUNITY: good first issue Good for newcomers COMP: DX Developer Experience related issue COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it and removed STATUS-1: needs triage New issue which needs to be triaged labels Jan 6, 2024
@gioboa gioboa changed the title [✨] Please make the CLS borders opt-in [✨] option to disable CLS warn Jun 14, 2024
@gioboa
Copy link
Member

gioboa commented Jun 14, 2024

Closed by #6450

@gioboa gioboa closed this as completed Jun 14, 2024
@shairez
Copy link
Contributor

shairez commented Jun 15, 2024

@gioboa are you sure it's handling the CLS issue and not just the images?

@gioboa
Copy link
Member

gioboa commented Jun 15, 2024

I linked the wrong PR. Here you are #6427

@shairez
Copy link
Contributor

shairez commented Jun 15, 2024

thanks!

@shairez shairez closed this as completed Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it COMP: DX Developer Experience related issue STATUS-2: waiting for community PR TYPE: enhancement New feature or request
Projects
None yet
6 participants