Open audez opened 2 years ago
Hello @audez I would like to attempt this one. Could you please assign it to me?
Hi @AthiraKadampatta and welcome! I have assigned it to you! Let us know if you get stuck or if anything is unclear. Looking forward to your contribution! 🤗
@audez be cautious with the good first issue label, especially when it comes to Angular, it can be very tough. In doubt, ask a dev to add the label ;) Also I know this looks like a bug, but for all UX issue we should go through the wishlist process I think.
@AthiraKadampatta let us know how it goes. Note also that @binarygit is currently migrating all enterprise settings from angular to stimulus reflex. So I'm not sure it's worth spending time fixing this in Angular. @binarygit what do you think?
I don't think it's a good idea to try and fix this in Angular :sweat_smile: . I think you'll need to look at the update
method in app/controllers/enterprises_controller.rb
because that's the action invoked after clicking update
.
The view files for this screen are located in app/views/admin/enterprises
, also app/views/admin/shared/_side_menu.html.haml
renders the side menu and has the local anchor links such as #users
or #primary_details
.
There's some things I thought I'd share what I know about this here, maybe it'll help:
edit#!#primary_details_panel
, there shouldn't be a #!
in there but the pages render because the browser is forgiving.#!
probably comes from AngularJs but I could not track down which line of code causes thisedit#primary_details_panel
is automatically turned into edit#!#primary_details_panel
by the browserAlso I have a rough idea of what might work:
Thanks for the feedback @binarygit ! Can this be already worked on right now with Stimulus Reflex or is it best to wait for your work to be completely done?
oh yes. It can be worked on right now :smiley:
hello @AthiraKadampatta Just to be sure: are you working on this issue?
I think it's the same problem but just to add this info: When you're in Enterprise settings and you reload the page, whatever tab you were in, it brings you back on "Primary details". And more boring: let's say you went in "Shipping methods" tab, you go in "Create a new shipping method", you click the previous arrow in your browser, and instead of being back to "Shipping methods" tab you land on "Primary details"
As no one is working on this I'm moving this to wishlist to review it during next papercut meeting.
Hi @RachL, Sorry I missed the above message. It took some time for me to understand Stimulus. I have tried to fix the issue in the draft PR - here. I have handled selection of the tab/panel based on the URL identifier.
I would like somebody to have a look at it before I finalize the PR. Thanks!
Description
In Enterprise > Parameters, if you make some changes in any of the tab and click update, the page reloads, but brings you back on Primary Details.
Expected Behavior
You should remain on the same tab.
Actual Behaviour
When editing parameters on any tab (for ex Address - /edit#!#address_panel - or Social - edit#!#social_panel), and clicking the "Update" button, it brings you back on Primary details tab (/edit#!#primary_details_panel)
Steps to Reproduce
Animated Gif/Screenshot
Workaround
You have to go back to the tab you were in, it's annoying.
Severity
bug-s4: it's annoying, but you can use it