parse-dashboard icon indicating copy to clipboard operation
parse-dashboard copied to clipboard

feat: Add relational filter conditions in data browser

Open vardhan0604 opened this issue 1 year ago • 25 comments

New Pull Request Checklist

  • [x] I am not disclosing a vulnerability.
  • [x] I am creating this PR in reference to an issue.

Issue Description

Added filter conditions that relate to other classes. Since Parse Dashboard knows the entire schema, it also knows which other classes have a pointer to the currently displayed class; it can use that information to allow for filtering by fields of these related classes.

image

Closes: #2496

vardhan0604 avatar Jun 26 '24 18:06 vardhan0604

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@mtrezza, can you please check this

vardhan0604 avatar Jun 26 '24 18:06 vardhan0604

Uffizzi Ephemeral Environment deployment-53547

:watch: Updated Jun 26, 2024, 18:37 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jun 26 '24 18:06 uffizzi-cloud[bot]

Hey @mtrezza, I have fixed the lint issue, can you please review the PR

vardhan0604 avatar Jun 27 '24 15:06 vardhan0604

The dashboard data browser seems to be continuously loading the table; not sure if that is a bug related to this feature, still investigating. You can see this by launching the preview environment from the uffizzi-cloud comment and just opening a collection like "_User".

Edit: I can confirm that the issue only occurs in this PR; could you look into that?

mtrezza avatar Jun 27 '24 23:06 mtrezza

Uffizzi Ephemeral Environment deployment-53601

:watch: Updated Jun 27, 2024, 23:49 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jun 27 '24 23:06 uffizzi-cloud[bot]

I've marked some var names with incorrect caps. There are more, could you please correct them?

data browser seems to be continuously loading the table

Sure, I will correct them and I will look into the second issue as well

vardhan0604 avatar Jun 28 '24 00:06 vardhan0604

Uffizzi Ephemeral Environment deployment-53602

:watch: Updated Jun 28, 2024, 00:25 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jun 28 '24 00:06 uffizzi-cloud[bot]

The preview environment does not update on every commit. If you want to update the environment you can close and re-open this PR, then after a few minutes uffizzi will post a new comment with the update env link.

mtrezza avatar Jun 28 '24 00:06 mtrezza

The preview environment does not update on every commit. If you want to update the environment you can close and re-open this PR, then after a few minutes uffizzi will post a new comment with the update env link.

ohh okay, I will keep that in my mind

vardhan0604 avatar Jun 28 '24 01:06 vardhan0604

Uffizzi Ephemeral Environment deployment-53606

:watch: Updated Jun 28, 2024, 09:32 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jun 28 '24 09:06 uffizzi-cloud[bot]

Uffizzi Ephemeral Environment deployment-53631

:watch: Updated Jun 28, 2024, 17:38 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jun 28 '24 17:06 uffizzi-cloud[bot]

data browser seems to be continuously loading the table

@mtrezza I have fixed this issue and also fixed the var names. can you please review the code?

vardhan0604 avatar Jun 28 '24 17:06 vardhan0604

Uffizzi Ephemeral Environment deployment-53642

:watch: Updated Jun 28, 2024, 22:45 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jun 28 '24 22:06 uffizzi-cloud[bot]

Uffizzi Ephemeral Environment deployment-53650

:watch: Updated Jun 29, 2024, 11:33 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jun 29 '24 11:06 uffizzi-cloud[bot]

Code looks good; will do some test scenarios to see if it breaks anything else.

sure lemme know if i need to make any changes

vardhan0604 avatar Jun 29 '24 12:06 vardhan0604

I tested the example scenario described in the feature request and it worked well. I can already tell that this feature will be very helpful to many dashboard users, good job. Here are just some minor details I have found:

  • When adding a new filter condition, the default class should be the currently visible class in the data browser. In my test it defaulted to the custom Transaction class despite adding the filter being in the _User class.
  • For better visual, could you add a margin between the "Clear" and "Add" buttons? This also prevents accidentally clicking "Clear" instead of "Add". FYI, I've added a 150px margin-right to the "Clear" button in the image. image
  • Could you please add an entry to the README.md under "Features" > "Data Browser" > "Filter" in which you describe in a few words that the data browser allows to add relational filter conditions based on other classes that have a pointer to the current class. Basically, one should understand that a class only shows up if it has a pointer to the class that is currently displayed.

Note:

  • I tested saving the filter and applying the saved filter, both worked fine.

mtrezza avatar Jun 30 '24 12:06 mtrezza

Uffizzi Ephemeral Environment deployment-53665

:watch: Updated Jul 01, 2024, 05:48 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jul 01 '24 05:07 uffizzi-cloud[bot]

  • When adding a new filter condition, the default class should be the currently visible class in the data browser. In my test it defaulted to the custom Transaction class despite adding the filter being in the _User class.

  • For better visual, could you add a margin between the "Clear" and "Add" buttons? This also prevents accidentally clicking "Clear" instead of "Add". FYI, I've added a 150px margin-right to the "Clear" button in the image.

  • Could you please add an entry to the README.md under "Features" > "Data Browser" > "Filter" in which you describe in a few words that the data browser allows to add relational filter conditions based on other classes that have a pointer to the current class. Basically, one should understand that a class only shows up if it has a pointer to the class that is currently displayed.

Hey @mtrezza , I have done the first two changes asked by you but for the 3rd I'm not sure where and how to do that? image is this how we are supposed to do or how? sorry i havent contributed in docs before

vardhan0604 avatar Jul 01 '24 08:07 vardhan0604

Just one last thing, given that our filter dialog is now more complex with an additional column, do you think you could add the headings "Class, Field, Condition, Value", like in the screenshot? I believe this would make the UI easier to use. If that's too much work, no worries, we can merge without.

And I found another tiny issue: classes with a pointer to the current class only appear in the filter dialog after reloading the dashboard in the browser window. It seems that the schema is not updated locally after adding a pointer field to a class. I'm not sure whether this is a general dashboard issue that the schema is not updated, or whether it is related to this feature.

mtrezza avatar Jul 01 '24 17:07 mtrezza

Uffizzi Ephemeral Environment deployment-53693

:watch: Updated Jul 01, 2024, 17:05 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jul 01 '24 17:07 uffizzi-cloud[bot]

Just one last thing, given that our filter dialog is now more complex with an additional column, do you think you could add the headings "Class, Field, Condition, Value", like in the screenshot? I believe this would make the UI easier to use. If that's too much work, no worries, we can merge without.

And I found another tiny issue: classes with a pointer to the current class only appear in the filter dialog after reloading the dashboard in the browser window. It seems that the schema is not updated locally after adding a pointer field to a class. I'm not sure whether this is a general dashboard issue that the schema is not updated, or whether it is related to this feature.

Hey @mtrezza , I have fixed the second issue and added the headings in the UI. you can check it and test it out. lemme know if something breaks

vardhan0604 avatar Jul 02 '24 17:07 vardhan0604

Uffizzi Ephemeral Environment deployment-53743

:watch: Updated Jul 02, 2024, 17:18 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jul 02 '24 17:07 uffizzi-cloud[bot]

Uffizzi Ephemeral Environment deployment-53788

:watch: Updated Jul 03, 2024, 13:05 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jul 03 '24 13:07 uffizzi-cloud[bot]

It seems that the class is still only displaying after a website refresh. Could you check please? The headings look great!

Hey @mtrezza , you can check I have fixed the issue

vardhan0604 avatar Jul 03 '24 13:07 vardhan0604

Uffizzi Ephemeral Environment deployment-53907

:watch: Updated Jul 06, 2024, 13:24 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2576

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jul 06 '24 13:07 uffizzi-cloud[bot]

🎉 This change has been released in version 6.0.0-alpha.9

parseplatformorg avatar Jul 06 '24 14:07 parseplatformorg

🎉 This change has been released in version 6.0.0-beta.2

parseplatformorg avatar Oct 07 '24 13:10 parseplatformorg

🎉 This change has been released in version 6.0.0

parseplatformorg avatar Oct 07 '24 13:10 parseplatformorg