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: Highlight Query Not Saved Changes #2434

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WaseemMansour
Copy link

Fixes

#2425

Checks

  • Ran yarn test-build
  • Updated relevant documentations
  • Updated matching config options in altair-static

Changes proposed in this pull request:

  • Added logic to check if query editor content does not match the query saved in the collection.
  • If not matching, highlight the Save Button in a different color.
image

@imolorhe
Copy link
Collaborator

@WaseemMansour thanks for picking this up! I like the direction you're going with this. However I was thinking about this and I think we will want to move the logic for calculating the "unsaved" state into a selector in the store (here are some tips on creating parameterized selectors). The reason for this is that we will want to use the logic in the window tabs (which is outside the window component) as well to show an indicator that it is unsaved.

Additionally, the save button contains multiple actions in a dropdown so changing it may not reflect what we want. Preferably we would want to disable the dropdown menu item that performs the save action instead. I can think of splitting out the dropdown menu into individual buttons to make it better.

@WaseemMansour
Copy link
Author

Thanks for this good feedback @imolorhe, Actually this makes sense.
I will work on this. and hopefully, get it done :).

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.

2 participants