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

Parameter feedback - #5 Unsaved indication #4322

Merged
merged 6 commits into from
Jul 21, 2023

Conversation

ranbena
Copy link
Contributor

@ranbena ranbena commented Oct 30, 2019

  • Feature

Description

Riding on the new param feedback feature, here's an indication for unsaved parameters as they are added.

  • Basic Cypress tests

@ranbena ranbena changed the base branch from master to param-feedback-4 October 30, 2019 18:42
@ranbena ranbena changed the title Param feedback 5 Parameter feedback - #5 Unsaved indication Oct 30, 2019
@ranbena ranbena marked this pull request as ready for review October 31, 2019 08:08
@ranbena ranbena self-assigned this Oct 31, 2019
@gabrieldutra
Copy link
Member

Just one thing in case you already had thoughts about it: It makes sense to have the same indication in the future for modified parameters (not sure if that will be a quick thing, so no need for it now 😅)

@ranbena
Copy link
Contributor Author

ranbena commented Oct 31, 2019

Just one thing in case you already had thoughts about it: It makes sense to have the same indication in the future for modified parameters (not sure if that will be a quick thing, so no need for it now 😅)

Definitely. It's really not clear that changing a parameter setting requires saving the query.
But the implementation is not as simple as this one.

const feedback = (
<>
Unsaved{' '}
<Tooltip title='Click the "Save" button to preserve this parameter.'>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@susodapop any better suggestions for this text?

Copy link
Contributor

Choose a reason for hiding this comment

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

'Click the "Save" button to make this the default value for this parameter.'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it's actually for the parameter itself - not its value.
The case is when a new parameter is typed into the query but ain't saved to DB till the user hits the "save" button.

Copy link
Contributor

@susodapop susodapop Nov 4, 2019

Choose a reason for hiding this comment

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

In that case it's no different than any other change to a query. Is a special message necessary? I like the yellow outline. Perhaps the effect could be complemented by a similar change in color to the Save button.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a must, but the asterisk indication imo is not clear enough for changes that are represented below it (including parameter setting changes which is out of scope).
I encourage you to experience it and see for your self if it provides a better user experience.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree the asterisk is sub-optimal. Could we replace it with an indicator that is more obvious?

If you keep the tooltip then the text you've written above is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One way to go about it is not show or disable the Save button when query isn't dirty.
So when it is, there would be a clear indication that there are changes to be saved.

Another reason I wanted this inline indication was so that it would be clear which parameter corresponds to the one added. So "Unsaved" could be substituted with "New parameter" with a green color instead.

@arikfr how do you feel about this feature?

Copy link
Collaborator

@kravets-levko kravets-levko left a comment

Choose a reason for hiding this comment

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

I think that this code needs a little bit refactoring (make parseQuery a regular function, move getUnsavedParameters to Query service, and so on - nothing specific to suggest ATM). But I decided that it's good enough for now (we can do refactoring later). So approved 👍

client/app/services/query.js Outdated Show resolved Hide resolved
client/app/services/query.js Outdated Show resolved Hide resolved
@guidopetri guidopetri merged commit a33f615 into param-feedback-4 Jul 21, 2023
5 checks passed
@guidopetri guidopetri deleted the param-feedback-5 branch July 21, 2023 19:35
guidopetri pushed a commit that referenced this pull request Jul 21, 2023
* Parameter feedback - #4 Added in Dashboard params

* Added cypress test

* Moved to service

* Parameter feedback - #5 Unsaved indication (#4322)

* Parameter feedback - #5 Unsaved indication

* Added ANGULAR_REMOVE_ME

* Added cypress test

* Fixed percy screenshot

* Some code improvements

* Parameter input feedback - #6 Better value normalization (#4327)
guidopetri pushed a commit that referenced this pull request Jul 21, 2023
* Parameter feedback - #3 Added in Widgets

* Added cypress tests

* Making sure widget-level param is selected

* Parameter feedback - #4 Added in Dashboard params (#4321)

* Parameter feedback - #4 Added in Dashboard params

* Added cypress test

* Moved to service

* Parameter feedback - #5 Unsaved indication (#4322)

* Parameter feedback - #5 Unsaved indication

* Added ANGULAR_REMOVE_ME

* Added cypress test

* Fixed percy screenshot

* Some code improvements

* Parameter input feedback - #6 Better value normalization (#4327)
guidopetri pushed a commit that referenced this pull request Jul 21, 2023
* Parameter feedback - #2 Client errors in query page

* Added cypress test

* Fixed percy screenshot

* Safer touched change

* Parameter feedback - #3 Added in Widgets (#4320)

* Parameter feedback - #3 Added in Widgets

* Added cypress tests

* Making sure widget-level param is selected

* Parameter feedback - #4 Added in Dashboard params (#4321)

* Parameter feedback - #4 Added in Dashboard params

* Added cypress test

* Moved to service

* Parameter feedback - #5 Unsaved indication (#4322)

* Parameter feedback - #5 Unsaved indication

* Added ANGULAR_REMOVE_ME

* Added cypress test

* Fixed percy screenshot

* Some code improvements

* Parameter input feedback - #6 Better value normalization (#4327)
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.

5 participants