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

Filter values as a string not an object #7448

Merged
merged 5 commits into from
Feb 5, 2024
Merged

Conversation

shefalijoshi
Copy link
Contributor

@shefalijoshi shefalijoshi commented Jan 31, 2024

Closes #7389

Describe your changes:

Use the value of a property for filtering metadata as a string if it is not undefined.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Is this a breaking change to be called out in the release notes?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

@shefalijoshi shefalijoshi added this to the Target:4.0.0 milestone Jan 31, 2024
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (82fa4c1) 55.41% compared to head (a27f1d3) 55.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7448      +/-   ##
==========================================
- Coverage   55.41%   55.41%   -0.01%     
==========================================
  Files         671      671              
  Lines       26919    26920       +1     
  Branches     2614     2614              
==========================================
  Hits        14917    14917              
  Misses      11287    11287              
- Partials      715      716       +1     
Flag Coverage Δ
e2e-full 49.02% <ø> (+0.08%) ⬆️
e2e-stable 59.15% <0.00%> (+0.19%) ⬆️
unit 48.38% <0.00%> (-0.04%) ⬇️
Files Coverage Δ
.../plugins/timelist/inspector/FilteringComponent.vue 0.00% <ø> (ø)
src/plugins/plan/util.js 41.33% <0.00%> (-0.56%) ⬇️

... and 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82fa4c1...a27f1d3. Read the comment docs.

@shefalijoshi shefalijoshi requested review from scottbell and removed request for michaelrogers February 1, 2024 14:43
@scottbell
Copy link
Contributor

I'm not sure how to test this given the instructions on the ticket. Is Duration metadata? If so, it doesn't appear to be functioning correctly. I tried entering as 15:
Screenshot 2024-02-01 at 3 58 17 PM

which rendered no items:
Screenshot 2024-02-01 at 3 58 27 PM

Putting in the exact duration didn't seem to work either:
Screenshot 2024-02-01 at 3 56 58 PM

One other confusing thing: In edit mode, the time conductor bounds seem to be ignored? It makes adding filters rather confusing:

Screen.Recording.2024-02-01.at.4.03.57.PM.mov

Copy link
Contributor

@scottbell scottbell left a comment

Choose a reason for hiding this comment

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

Having trouble testing this. We should make the testing instructions more clear with images, or a video. Also, we should add an e2e test.

@shefalijoshi
Copy link
Contributor Author

shefalijoshi commented Feb 1, 2024

I'm not sure how to test this given the instructions on the ticket. Is Duration metadata? If so, it doesn't appear to be functioning correctly. I tried entering as 15: Screenshot 2024-02-01 at 3 58 17 PM

which rendered no items: Screenshot 2024-02-01 at 3 58 27 PM

Putting in the exact duration didn't seem to work either: Screenshot 2024-02-01 at 3 56 58 PM

One other confusing thing: In edit mode, the time conductor bounds seem to be ignored? It makes adding filters rather confusing:
Screen.Recording.2024-02-01.at.4.03.57.PM.mov

Duration can be metadata if you define it in the sourcemap or if it is part of an activity's property like this:
activity: {properties: {duration: 15}}

One other confusing thing: In edit mode, the time conductor bounds seem to be ignored? It makes adding filters rather confusing: This is working as designed.

We have a unit test for this already. We can add e2e test later.

I've added documentation for sourceMaps is here: fix-filter-metadata
Testing Instructions are updated here: #7389 (comment)

@scottbell
Copy link
Contributor

Filtering on activities and with commas appeared to work:
Screenshot 2024-02-02 at 1 41 38 PM

as does meta-filtering:
Screenshot 2024-02-02 at 1 41 47 PM
Screenshot 2024-02-02 at 1 42 48 PM

with both filters in use, are they supposed to be OR'd together? That looks like the current implementation:
Screenshot 2024-02-02 at 1 44 51 PM

Also, PR doesn't look like it addresses @charlesh88's other issues, in particular:

We can't filter on values with "." in them - why not? If the user is trying to filter on a decimal number, they won't be able to.
The error messaging for the input is very poor and provides no concrete feedback of what the problem is or how to address it. This needs to be addressed from a text and layout standpoint.

Screenshot 2024-02-02 at 1 46 44 PM

src/plugins/plan/util.js Outdated Show resolved Hide resolved
@scottbell
Copy link
Contributor

Looks like one can enter . now in filters too:
image

@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 2, 2024
Copy link
Contributor

@scottbell scottbell left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 2, 2024
@shefalijoshi shefalijoshi enabled auto-merge (squash) February 5, 2024 17:08
@shefalijoshi shefalijoshi added pr:e2e:couchdb npm run test:e2e:couchdb type:bug labels Feb 5, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 5, 2024
@shefalijoshi shefalijoshi merged commit 0aceb4b into master Feb 5, 2024
27 of 29 checks passed
@shefalijoshi shefalijoshi deleted the fix-filter-metadata branch February 5, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow filtering of time list activities by metadata
2 participants