PB-984: add error feedback for all URL parameters#1067
Merged
Conversation
25a93ef to
09defc2
Compare
a29b553 to
69f0aa8
Compare
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
feat-PB-984-error-feedback-for-all-url-parameters
|
| Run status |
|
| Run duration | 05m 05s |
| Commit |
|
| Committer | Martin Künzi |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
21
|
|
|
0
|
|
|
211
|
| View all changes introduced in this branch ↗︎ | |
ltshb
previously requested changes
Sep 18, 2024
Contributor
ltshb
left a comment
There was a problem hiding this comment.
I did not find the ticket from the sprint ? Should we not concentrate on the sprint tickets based on our team discussions?
30c1941 to
0d40728
Compare
7c8d595 to
f8df7e6
Compare
pakb
reviewed
Sep 30, 2024
f8df7e6 to
c2c9480
Compare
0b30c0f to
66293c1
Compare
pakb
approved these changes
Oct 1, 2024
Contributor
pakb
left a comment
There was a problem hiding this comment.
some more snake case to remove and we are good to go
d670d32 to
08bd650
Compare
He's on vacation and we want to go on with this PR
Issue : when modifying the URL directly, users received no feedback about what they did wrong when making mistakes, especially on a productive environment where most logs are deactivated. Fix : we now give a feedback for every parameter that is wrongfully filled. We also added some extra cases for the layers, where we want to give a feedback on each individual layer, and for the time slider when everything is in order, but there are no layers supporting it.
- Added a way to handle external layers in the acceptedValues for layers, sending an error feedback when users try to add an external layer which doesn't have a scheme - Small correction to the backgroundLayer acceptedValues, where we were not looking at the right place for information, causing the background layer to be void as soon as we tried to reload. small adjustments
- We now return an object containing a validation Boolean, errors and warnings to be pushed - We need to implement the 'addErrors' and 'addWarnings' methods - Simplification of the layers validation : we no longer give the full set of parameters, since the only thing that we check is the layer id / base url
- Added the store methods to handle the changes - Also modified the warnings queue to follow the same logic as the error queue
…e rather than being a method of the AbstractParameterClass, as this couldn't be used in the basic storesync parameters
- we removed some artifacts from when error queues functions were a part of abstractParamConfig class
… when trying to populate the store
- the timeslider, when reloading, would handle the parameter as a string, and would fail the Number.isInteger test. Also, when activating the timeslider through the button, it would trigger a URL change, and detect some parameters (crosshair and camera, for example) as being present but undefined, causing errors to appear. small update : ensuring we compare sr as a number small update: featureInfo is case insensitive
- Removed double ternary operator in LayerParamConfig for easier reading - Removed dirty ssssssnake case in errorQueues - Comments should be in better places, and/or explaining some not so evident parameters validations
Issue : the validation returned a falsy value when the layer parameter was set to an empty string. Also, setting the layer parameter to en empty string would give you the store content, as it was ignoring the parameter in those case Fix : add a check for an empty string at the very beginning of the layer param validation, and added a check to ensure we can populate the layers with an empty string removing some snakes
08bd650 to
bf8e56e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue : when modifying the URL directly, users received no feedback about what they did wrong when making mistakes, especially on a productive environment where most logs are deactivated.
Fix : we now give a feedback for every parameter that is wrongfully filled. We also added some extra cases for the layers, where we want to give a feedback on each individual layer, and for the time slider when everything is in order, but there are no layers supporting it.
Test link