Skip to content

Ab#79314 add filters tooltips #2088

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

Open
wants to merge 11 commits into
base: beta
Choose a base branch
from
Open

Conversation

MwanPygmay
Copy link
Contributor

@MwanPygmay MwanPygmay commented Nov 21, 2023

Description

Add suggestions to filters as tooltips (see screenshots).
Following fields are supported: numeric, text, time, date.

  • numeric: provide min and max value.
  • text: provide five most common examples.
  • time: provide min and max date.
  • date: provide min and max date.

They should be supported everywhere filters are used: if data can not be acquired, check for a missing resource id, this is the most probable error source.
Time could not be tested as it has no special status in the filters.

Useful links

Type of change

Please delete options that are not relevant.

  • Improvement (refactor or addition to existing functionality)

How Has This Been Tested?

Created four fields from above types. Tried to go everywhere filters are used (see places where a resourceId was provided), and checked if tooltip could indeed be acquired.

Screenshots

Screenshot from 2023-11-21 15-42-26
Screenshot from 2023-11-21 15-42-23
Screenshot from 2023-11-21 15-42-22
Screenshot from 2023-11-21 15-42-20

Checklist:

( * == Mandatory )

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@MwanPygmay MwanPygmay self-assigned this Nov 21, 2023
@MwanPygmay MwanPygmay requested a review from a team November 21, 2023 14:58
@MwanPygmay MwanPygmay added the enhancement New feature or request label Nov 21, 2023
@estelafs estelafs requested review from estelafs and removed request for a team November 21, 2023 18:33
… a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Copy link
Contributor

@estelafs estelafs left a comment

Choose a reason for hiding this comment

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

I did some updates:

  • Updated translations where wrong key was used and spaces missing
  • Updated incomplete code to work for time fields

@MwanPygmay the date questions type is not working, the request is never sent and we don't have a tooltiṕ, please check.

Also, @AntoineRelief Should all scalar fields have tooltips, even those that are not related to questions such as "createdBy - name"? At the moment the backend doens't return values for these kind of fields, should we add in the frontend a check to disable the tooltip and don't query the hint for these fields or add hint to all of them?

@MwanPygmay
Copy link
Contributor Author

MwanPygmay commented Nov 22, 2023

I did some updates:

* Updated translations where wrong key was used and spaces missing

* Updated incomplete code to work for time fields

@MwanPygmay the date questions type is not working, the request is never sent and we don't have a tooltiṕ, please check.

Also, @AntoineRelief Should all scalar fields have tooltips, even those that are not related to questions such as "createdBy - name"? At the moment the backend doens't return values for these kind of fields, should we add in the frontend a check to disable the tooltip and don't query the hint for these fields or add hint to all of them?

Yes, will rework on that, thanks for the translation! Mmmmh weird for the date questions, they work on my side, are you sure this is not a time question problem?

EDIT: Tested, refactored back-end. Every type from numeric, text, date and time is working. The only thing is that as time is using text editor, it uses 'Examples from datasource' instead of 'Values from datasource are between', but I think the correct fix would be to have a time editor inside of the filters.

@estelafs estelafs self-requested a review November 22, 2023 12:05
@estelafs
Copy link
Contributor

EDIT: Tested, refactored back-end. Every type from numeric, text, date and time is working. The only thing is that as time is using text editor, it uses 'Examples from datasource' instead of 'Values from datasource are between', but I think the correct fix would be to have a time editor inside of the filters.

@MwanPygmay Huum, that's weird. Here's a gif of my problem with the date type (is really a single-input question of type date): is working for the text questions, request sent etc, but when I try with the date question nothing happens, just the date format tooltip is displayed

date.webm

@MwanPygmay
Copy link
Contributor Author

EDIT: Tested, refactored back-end. Every type from numeric, text, date and time is working. The only thing is that as time is using text editor, it uses 'Examples from datasource' instead of 'Values from datasource are between', but I think the correct fix would be to have a time editor inside of the filters.

@MwanPygmay Huum, that's weird. Here's a gif of my problem with the date type (is really a single-input question of type date): is working for the text questions, request sent etc, but when I try with the date question nothing happens, just the date format tooltip is displayed
date.webm

Indeed there is a date template in the query builder that did not get its tooltip, latest commits should fix it @estelafs

MwanPygmay and others added 2 commits November 23, 2023 09:59
… a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants