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

Things List: Add multiple search, select all. Inbox: Go to newly approved Thing(s) #3020

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jimtng
Copy link
Contributor

@jimtng jimtng commented Jan 14, 2025

There are several changes wrapped up in this PR because they are somewhat interdependent.

Filtering/Searching + Selections

  • The Thing count is updated to reflect the number of matches found when performing search/filtering

  • When filtering, the invisible Things (i.e. Things that do not meet the filter criteria) will be deselected. Only Things within the filtered result can be selected and acted upon (Remove, Disable, Enable). So if you first selected all your things (e.g. 100 things) then perform search/filtering which result in 5 things, then the total selected Things will now be just 5, and when you hit Remove, only those 5 will be removed.

    This is a change in behaviour. Originally, the selected Things remain despite the search/filtering, so whilst the user may see 5 Things checked on the list, they can be removing other Things.

  • Add Select All / Deselect All. This also works in tandem with search/filter. When the filtered result shows only 5 Things, Select All will only select those 5 Things and not all the available Things on the system.

Here's an example of a filtered result + selection:
image

Search for Multiple Things

  • It is possible to search and display multiple Things by separating the search terms with a comma. This is implemented to make it possible for multiple Inbox items to be approved (through multi-selection) and then the user be presented with the list of those newly approved things.
  • Essentially it acts as an OR operator, e.g. searching for broker1,broker2 results in showing Things that match either broker1 or broker2 combined into the result list

Preload Things List search

  • This allows navigating to Things List page with a pre-defined search terms, also to support the inbox approval feature

Inbox approval

Single Thing Approval

  • Add as Thing and Add as Thing (with Custom ID) are merged into just Add as Thing. The subsequent dialog will prompt for both the Thing ID and the Label in one dialog, removing multiple steps.
    image

  • Thing UID / ID validation is performed within the Add a Thing dialog, and the validation status displayed instantly under the Thing ID input
    image
    It also checks against full UID conflicts against existing Things
    image

  • Here, the user is given two OK buttons.

    • OK -> Edit will approve the Thing and redirect them to the Thing Details page for that Thing
    • OK will approve it and bring them back to the same page (Inbox)

Multiple Things Approval

  • When multiple inbox items are selected and Approve is clicked, the user will be redirected to the Things List page, with pre-set filter to show all and only the approved Things.
image image

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Copy link

relativeci bot commented Jan 14, 2025

#2714 Bundle Size — 10.98MiB (+0.02%).

1118a42(current) vs 7ef5b6f main#2698(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 1 change
                 Current
#2714
     Baseline
#2698
No change  Initial JS 1.9MiB 1.9MiB
No change  Initial CSS 577.21KiB 577.21KiB
Change  Cache Invalidation 18.04% 17.51%
No change  Chunks 227 227
No change  Assets 250 250
No change  Modules 2951 2951
No change  Duplicate Modules 154 154
No change  Duplicate Code 1.8% 1.8%
No change  Packages 98 98
No change  Duplicate Packages 2 2
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#2714
     Baseline
#2698
Regression  JS 9.19MiB (+0.03%) 9.19MiB
No change  CSS 867.02KiB 867.02KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 140.74KiB 140.74KiB
No change  HTML 1.38KiB 1.38KiB
No change  Other 871B 871B

Bundle analysis reportBranch jimtng:things-searchProject dashboard


Generated by RelativeCIDocumentationReport issue

@jimtng jimtng marked this pull request as ready for review January 14, 2025 13:19
@jimtng jimtng force-pushed the things-search branch 2 times, most recently from 7dae381 to 1254f2a Compare January 14, 2025 13:41
@jimtng
Copy link
Contributor Author

jimtng commented Jan 14, 2025

Perhaps to make it super flexible, offer two approve/OK buttons:

[Cancel] [Approve and Edit] [Approve]

[Approve and Edit] brings the user to the Thing Details page
[Approve] keeps the user in Inbox.

WDYT?

@rkoshak
Copy link

rkoshak commented Jan 14, 2025

Seems reasonable. I like having the option and having that option might be less disruptive to the workflow some people might be used to.

@jimtng
Copy link
Contributor Author

jimtng commented Jan 14, 2025

OK I'll add that here. Switching to Draft, it'll be force-pushed until it's ready + reviewed

@jimtng jimtng marked this pull request as draft January 14, 2025 14:53
@jimtng
Copy link
Contributor Author

jimtng commented Jan 14, 2025

Another option:

image

I think I like this version. I'll go with this

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
@jimtng
Copy link
Contributor Author

jimtng commented Jan 14, 2025

Changed and original post updated with new screenshots

@jimtng jimtng marked this pull request as ready for review January 14, 2025 15:59
@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants