Skip to content

fix #4326 管理画面のオプション部分などのアコーディオンの開閉を記録・復元する機能を追加#4328

Open
kaburk wants to merge 1 commit intobaserproject:5.2.xfrom
kaburk:5.2.x-#4326
Open

fix #4326 管理画面のオプション部分などのアコーディオンの開閉を記録・復元する機能を追加#4328
kaburk wants to merge 1 commit intobaserproject:5.2.xfrom
kaburk:5.2.x-#4326

Conversation

@kaburk
Copy link
Collaborator

@kaburk kaburk commented Mar 13, 2026

よろしくお願いします!

Copilot AI review requested due to automatic review settings March 13, 2026 12:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a feature to save and restore the open/close state of accordion sections (options, detailed settings, etc.) in the baserCMS admin panel. The state is persisted per plugin+controller path using localStorage, so accordion sections remain in the same open/close state across page reloads.

Changes:

  • Added getAccordionStorageKey(), loadAccordionState(), and saveAccordionState() helper functions to manage accordion state in localStorage, scoped by URL path segments.
  • Added DOM-ready initialization code to restore accordion states from localStorage on page load.
  • Updated the accordion click handler to persist state changes to localStorage and added a guard for missing data-bca-target.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
plugins/bc-admin-third/src/js/admin/startup.js Core logic: added localStorage-based accordion state persistence and restoration functions, and updated click handler
plugins/bc-admin-third/webroot/js/admin/startup.bundle.js Rebuilt minified bundle reflecting the source changes
plugins/bc-admin-third/webroot/js/admin/startup.bundle.js.map Updated source map for the rebuilt bundle

You can also share your feedback on Copilot code review. Take the survey.

}

// 初期状態の復元
$(function() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

startup は、defer 前提で読み込んでいるので、 $(function() { は、なくてもいいです

Copy link
Collaborator

@ryuring ryuring left a comment

Choose a reason for hiding this comment

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

@kaburk レビューいれました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants