fix: Namespace builder localStorage keys per directory type#2797
Merged
Armanul46 merged 1 commit intosovware:developmentfrom Apr 7, 2026
Merged
Conversation
Previously, all directory types shared the same localStorage keys for UI state (active tabs, expanded groups, widget states). This caused state from one directory type to carry over when switching to another. Append listing_type_id to all localStorage keys in the CPT Manager so each directory type maintains independent UI state.
Collaborator
|
works fine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Summary
Fix builder UI state (active tabs, expanded groups, widgets) carrying over between different directory types by namespacing all localStorage keys with the listing type ID.
What Changed
Function Changes
listing_type_idto Vuex store state andsetListingTypeIdmutation_${typeId}suffixlisting_type_idon component mount and after saveUX Changes
UI Changes
Files Changed
JavaScript
assets/src/js/admin/vue/store/CPT_Manager_Store.js— Add listing_type_id state and namespace top tab localStorage keyassets/src/js/admin/vue/apps/cpt-manager/CPT_Manager.vue— Set listing_type_id in store, read namespaced key on restoreassets/src/js/admin/vue/modules/Submenu_Module.vue— Namespace sub-tab localStorage key with type IDassets/src/js/admin/vue/modules/form-fields/Form_Builder_Field.vue— Namespace expanded group localStorage key with type IDassets/src/js/admin/vue/modules/form-builder-modules/widget-group-components/Form_Builder_Widget_Group_Component.vue— Namespace expanded widget localStorage key with type IDassets/src/js/public/components/instantSearch.js— Code formatting cleanupassets/src/js/public/search-form.js— Code formatting cleanupHow to Test
Any linked issues
Fixes #
Checklist
Additional Context