Skip to content

Hide codelens and bug step decorations when document is dirty#93

Merged
Discookie merged 1 commit intoEricsson:mainfrom
csordasmarton:fix_dirty_documents
Feb 22, 2022
Merged

Hide codelens and bug step decorations when document is dirty#93
Discookie merged 1 commit intoEricsson:mainfrom
csordasmarton:fix_dirty_documents

Conversation

@csordasmarton
Copy link
Copy Markdown
Contributor

@csordasmarton csordasmarton commented Feb 16, 2022

If there are unpersisted changes in the current document we will hide the provided codelens items and bug step decorations.

@csordasmarton csordasmarton added enhancement New feature or request bugfix labels Feb 16, 2022
@csordasmarton csordasmarton added this to the 1.3.0 milestone Feb 16, 2022
Copy link
Copy Markdown
Collaborator

@Discookie Discookie left a comment

Choose a reason for hiding this comment

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

  • Stepping into a dirty file is very unintuitive this way. The user clicks next step, switches from eg. a clean main.cpp to a dirty main.h, and no repr. steps are shown anywhere except the sidebar.
    There should be a popup or some other indicator that the steps are not shown because of the dirty flag. (Some extensions do this via a warning on line 0 column 0.)

  • When the user presses accidentally types a character and then undo's it, CodeLens reappears, but the highlights do not.

  • I'm not sold on the idea of hiding the highlights in the currently active file without a file switch. As long as there's no file switch or metadata reload, I think the diagnostics render fine.

There's also the consistency issue of a step's file being changed, so eg. changing main.h doesn't refresh the reports in main.cpp, and main.cpp's steps still render in an invalid way. That might be better suited for a separate PR though.

If there are unpersisted changes in the current document we will
hide the provided codelens items and bug step decorations.
Copy link
Copy Markdown
Collaborator

@Discookie Discookie left a comment

Choose a reason for hiding this comment

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

As discussed in a meeting, because CodeLens doesn't move properly with the code on Linux, hiding the decorations in the current file is fine.

Once we find a solution for #35, the decorations won't need to be hidden in the currently edited file anymore.

Otherwise LGTM!

@Discookie Discookie merged commit eee106f into Ericsson:main Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants