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

Autoselect prop key #4253

Merged
merged 10 commits into from
Jun 21, 2024
Merged

Autoselect prop key #4253

merged 10 commits into from
Jun 21, 2024

Conversation

zoldar
Copy link
Contributor

@zoldar zoldar commented Jun 20, 2024

Changes

Adjustments to the prop_key selection in the Properties breakdown tab.

  • If any prop keys are available for the current query, and nothing is yet stored, set the default to the first prop key found
  • If nothing is available, set the placeholder value to "No custom properties found", and disable the combobox
  • Validate stored properties against what prop keys are actually available for selection. If the stored key is not available, pick the first available as the default.
  • Never let an applied custom property filter decide what prop key is selected by default (we now support breakdown by other properties that are not filtered by as well, so this behaviour is irrelevant, even disturbing)

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • The UI has been tested both in dark and light mode

@zoldar zoldar added deploy-to-staging Special label that triggers a deploy to a staging environment preview labels Jun 20, 2024
@RobertJoonas
Copy link
Contributor

Just pushed another fix in b559d98

Before

The combobox shows up empty when no prop keys are found, yet the user is still able to interact with it and make another request, which is pointless at that point.

Screen.Recording.2024-06-20.at.17.35.50.mov

After

After having returned no results on the initial render of the combobox, we're disabling clicks on it and setting it's placeholder value to "No custom properties found"

Screen.Recording.2024-06-20.at.17.48.41.mov

@RobertJoonas
Copy link
Contributor

Another fix in 574eda1

Before

The previous prop key keeps hanging when the query changes

Screen.Recording.2024-06-20.at.17.58.47.mov

After

Set the propKey to null, and propKeyLoading to true, whenever query changes.

Screen.Recording.2024-06-20.at.18.03.44.mov

@RobertJoonas RobertJoonas marked this pull request as ready for review June 20, 2024 15:24
@RobertJoonas RobertJoonas merged commit a7ddc1a into master Jun 21, 2024
10 checks passed
@RobertJoonas RobertJoonas deleted the autoselect-prop-key branch June 21, 2024 08:02
ruslandoga pushed a commit that referenced this pull request Jun 23, 2024
* Autoselect propkey on opening properties breakdown

* reset propkey when query changes

* ignore custom prop filter when selecting a prop key

* throttle api requests

* Force loading state on combobox when loading propkey

* Remove artificial throttling of API requests

* Disable combobox when no prop keys are found

* drop prop_key and set loading true when query changes

* Update changelog

---------

Co-authored-by: Robert Joonas <[email protected]>
Co-authored-by: RobertJoonas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-to-staging Special label that triggers a deploy to a staging environment preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants