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

Compose sidebar navigation improvements #1457

Merged
merged 1 commit into from Oct 24, 2023

Conversation

kelanik8
Copy link
Contributor

The following changes are implemented

TODO: Summary

Changes in the user interface:

TODO: Add screenshots, recordings or remove this section

Checklist when submitting a final (!draft) PR

  • Commits are tidied up, squashed if needed and follow guidelines in CONTRIBUTING.md
  • Code builds
  • All existing tests pass
  • All new critical code is covered by tests
  • PR is linked to the relevant issue(s)
  • Rebased with the target branch

@kelanik8 kelanik8 requested a review from Fajfa September 25, 2023 07:07
@kelanik8 kelanik8 self-assigned this Sep 25, 2023
@kelanik8 kelanik8 linked an issue Sep 25, 2023 that may be closed by this pull request
const block = new compose.PageBlockRecordList({
blockIndex: 0,
options: {
moduleID: module.moduleID,
Copy link
Member

Choose a reason for hiding this comment

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

You dont need to reinit the whole block, it has a watcher on options, so just updating the moduleID should be enough
Also can you turn in into the regular watcher structure (the handler ()), also you need to check if module exists

created () {
const { meta = { ui: {} } } = this.module || {}

let fields = ((meta.ui || {}).admin || {}).fields || []
fields = fields.length ? fields : this.module.fields

const { moduleID } = this.module
Copy link
Member

Choose a reason for hiding this comment

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

You shouldnt do it here, you do it 5 rows above

@@ -347,6 +350,9 @@ export default {
},

adminRoutes () {
const routeName = this.$route.name
const pageName = routeName.endsWith('edit') ? 'admin.modules.edit' : 'admin.modules.record.list'
Copy link
Member

Choose a reason for hiding this comment

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

Wont this also trigger for admin.modules.record.edit?

@kelanik8 kelanik8 force-pushed the 2023.3.x-compose-sidebar-navigation-improvements branch from 2f2c2ec to 1d22858 Compare October 5, 2023 13:46
@kelanik8 kelanik8 force-pushed the 2023.3.x-compose-sidebar-navigation-improvements branch from 1d22858 to 703b8a1 Compare October 19, 2023 09:55
@kelanik8 kelanik8 changed the base branch from 2023.3.x to 2023.9.x October 19, 2023 09:55
@kelanik8 kelanik8 force-pushed the 2023.3.x-compose-sidebar-navigation-improvements branch from 703b8a1 to 8d9b4c8 Compare October 24, 2023 12:57
@kelanik8 kelanik8 merged commit 8d9b4c8 into 2023.9.x Oct 24, 2023
1 check passed
@kelanik8 kelanik8 deleted the 2023.3.x-compose-sidebar-navigation-improvements branch October 24, 2023 12:57
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.

Make compose sidebar respect the current page you're on
2 participants