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

[VSCode Revealer]: Fix revealer workflow for style properties sections #264

Merged
merged 4 commits into from
Feb 4, 2021

Conversation

mliao95
Copy link

@mliao95 mliao95 commented Jan 29, 2021

This PR changes revealing workflow for clicking style properties and style sheet links.

Issues:

  • VSCode reveals style sheet whenever a style property is clicked
  • Clicking on a style sheet in the styles properties section does not reveal anything

Changes:

  • VSCode only reveals the style sheet when the user CTRL + Click on the style property
  • Clicking on a style sheet link in the styles properties section will reveal the style sheet in VSCode.

GIF:
extension-fix-revealer

vidorteg
vidorteg previously approved these changes Feb 1, 2021
Copy link
Contributor

@vidorteg vidorteg left a comment

Choose a reason for hiding this comment

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

LGTM

src/host/polyfills/simpleView.ts Outdated Show resolved Hide resolved
@mliao95 mliao95 force-pushed the user/milia/styles-revealer-fix branch from 26aaff2 to c1e57b2 Compare February 1, 2021 22:01
@mliao95 mliao95 requested a review from vidorteg February 1, 2021 22:13
@mliao95 mliao95 merged commit 4108309 into master Feb 4, 2021
@billie-spektor
Copy link

billie-spektor commented Feb 26, 2022

Hi mliao95, I just noticed that clicking on the property (without ctrl) does bring me to the CSS file. Is this intentional behaviour or regression? I'm on version 1.4.5.

@mliao95
Copy link
Author

mliao95 commented Feb 28, 2022

Hey @billie-spektor , thanks for bringing this up. This is an intentional feature. Is this interrupting your workflow? If so, we'd love to hear about it and see what we can do from our side to provide a better experience.

@billie-spektor
Copy link

Hi @mliao95,

We previously talked about the reasons in #259; it mainly has to do with avoiding unintended context switching. When I'm working on a CSS component in file 1, I might want to quickly tweak or toggle a property for a different component in file 2 to see how these components interact.

Let's say component A is an animated button that moves in to the page from the bottom. This component is finished and now I'm working on component B, which is a picture that is on the page and in part behind the animated button. I would like to be able to easily alter the position of the button, maybe by temporarily turning off the animation, so that it doesn't interfere with the styling of component B, the picture. When I toggle the animation property, I'm (unintentionally) taken to the file for component A, even though that component is already finished. The only reason to turn the animation off was to avoid noise when styling component B.

I do like the ability to directly go to the file, but for me it works best if it's an explicit choice and not default behavior that is always triggered when experimenting and tweaking properties. Requiring control click (instead of just clicking) to jump to a file location also would be consistent with the implementation in the Edge developer tools in the browser.

If you prefer the current behavior, please consider a configuration option to alter this behavior.

@vidorteg vidorteg deleted the user/milia/styles-revealer-fix branch January 30, 2024 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants