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

Item Add: Navigate to the new Item once added #3010

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jimtng
Copy link
Contributor

@jimtng jimtng commented Jan 13, 2025

This PR changes the navigation / where the user is sent to after creating/adding a new item.

Currently, if you go to Settings -> Items -> Add -> Save, you'll be brought back to the Items list (back navigation).

  • If the user wants to add another item - it's easy, they can click + again to add another item. No problems.
  • But if the user wants to edit that new item, e.g. to edit metadata, add a link, etc. they would need to scroll around, or do a search for the item, click on it to get to that new item.

This PR changes this behavior so that after the new item is saved/added, the user is redirected to the Item Details page of that new item, so they can immediately work on it.

  • If they want to add more item, they can click < Back which will bring them to the Add Item page, so they can enter new details and create a new item.
  • If they want to go to the items list, they can just click cancel or Back again.

I think this workflow is more streamlined whether the user wants to add one item or multiple items.

This PR doesn't change the navigation behavior when editing an item. As previously done, the user would be sent back to the previous page, which would be the Item details. In other words: Settings -> Items (list) -> Item Details -> Edit -> Save -> Back to Item Details.

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

relativeci bot commented Jan 13, 2025

#2694 Bundle Size — 10.98MiB (~+0.01%).

c6574e2(current) vs e7d9b65 main#2689(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 1 change
                 Current
#2694
     Baseline
#2689
No change  Initial JS 1.9MiB 1.9MiB
No change  Initial CSS 577.21KiB 577.21KiB
Change  Cache Invalidation 18.04% 19.12%
No change  Chunks 227 227
No change  Assets 250 250
No change  Modules 2950 2950
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
#2694
     Baseline
#2689
Regression  JS 9.19MiB (~+0.01%) 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:item-create-returnpageProject dashboard


Generated by RelativeCIDocumentationReport issue

Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

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

Seems reasonable.
WDYT @ghys ?

@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Jan 13, 2025
@rkoshak
Copy link

rkoshak commented Jan 13, 2025

Would it be worth requesting something similar for Things too, at least when creating a Thing manually (e.g. Generic MQTT Thing)? I find that even more annoying than the Item behavior, perhaps because I rarely create an Item like that. Maybe a separate issue should be opened for that.

@florian-h05
Copy link
Contributor

Good point, Rich 👍
Instead of opening an issue, let’s ask Jim if he wants to change that right now.

@jimtng
Copy link
Contributor Author

jimtng commented Jan 13, 2025

Maybe open a separate issue..it will be in a different pr. Thanks

@rkoshak
Copy link

rkoshak commented Jan 13, 2025

#3013

@jimtng jimtng changed the title Item Add: Navigate to the new item once added Item Add: Navigate to the new Item once added Jan 14, 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