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

fix(Editor): Trigger gotoLine only when change is from sidebar #2012

Merged

Conversation

mdziekon
Copy link
Contributor

Description

  • Fixes jarring editor experience as described in New config files editor exhibits jarring experience when navigating through code #2011
    • It uses a flag to indicate when sidebar item activation originates from the sidebar itself, or somewhere else, by detecting the sidebar's item click. Not a perfect solution, but generally works, although it does leave a bit of a dead click zone when user clicks on very boundaries of sidebar's item. Still better than previous behavior.
    • Once Mainsail upgrades to Vuetify v3, this can be solved a bit easier & cleaner using click:open event handler of the Treeview component, see https://vuetifyjs.com/en/api/v-treeview/#events-click:open
  • Fixes JS error being thrown when sidebar item is deactivated by "unclicking" the item
    • Also, slightly improves TS typings for activeChanges, although due to this.editor being typed as any, this is just cosmetics and maybe slightly better code documentation experience

Related Tickets & Documents

#2011

Mobile & Desktop Screenshots/Recordings

Before

editor_before.webm

After

editor_after.webm

…ebar

Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
Signed-off-by: Michał Dziekoński <michal.dziekonski+github@gmail.com>
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 14, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 15, 2024
@meteyou meteyou changed the title fix(TheEditor): Trigger gotoLine only when change originates from sidebar fix(Editor): Trigger gotoLine only when change is from sidebar Sep 15, 2024
@meteyou meteyou merged commit 682a3dc into mainsail-crew:develop Sep 15, 2024
12 checks passed
@meteyou
Copy link
Member

meteyou commented Sep 15, 2024

Thank you very much for finding and fixing this issue before we released it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants