Skip to content

Move new menu item to sub menu#334

Merged
stklcode merged 7 commits into
developfrom
develop-submenu
Jun 19, 2026
Merged

Move new menu item to sub menu#334
stklcode merged 7 commits into
developfrom
develop-submenu

Conversation

@krafit

@krafit krafit commented Jun 13, 2026

Copy link
Copy Markdown
Member

I went for the path of least resistance and I'm not sure, this is my preferred solution.

The alternative route would be one merged page. And registering a single slug and switch views via a ?view= parameter inside show_view(). That would have been tidier, but it touches every internal page=... link in the three views and the #statify_dashboard selectors in dashboard.js.
I wanted to keep the edits light instead of doing a big restructuring of the codebase, but if we decide to go for the more complete approach, I'm game.

@krafit krafit added this to the 2.0.0 milestone Jun 13, 2026
@krafit
krafit requested a review from stklcode June 13, 2026 08:41
@stklcode

stklcode commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

I like it. Though with same thoughs on the actual implementation.

Hidden menu pages are a pretty nice trick, but I think I'd prefer the "view" parameter here.

That would have been tidier, but it touches every internal page=... link in the three views [...]

Yes, but it's not that many links. Maybe bundle the generation to a helper method like dashboard_link( string $view ) if it gets too messy 🤔 But we have to take care about (hidden) form parameters, too.

[...] and the #statify_dashboard selectors in dashboard.js.

Really? We don't touch the DOM IDs within our views, so I guess there's no change required on this side.

#statify_dashboard is a selector for the dashboard widget anyway.

Sorry for taking over your branch, I've added a view=... refactoring als PoC, feel free to revert/drop the commit if we decide for another path.

@krafit

krafit commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

The more the merrier! The view approach would have been more or less the other way I contemplated, so no hard feelings at all.

Comment thread inc/class-statify-evaluation.php Outdated
Comment thread inc/class-statify-evaluation.php Outdated
@krafit
krafit force-pushed the develop-submenu branch from 5d0ec46 to f0c48cc Compare June 16, 2026 21:28
@stklcode stklcode added the ui/ux label Jun 19, 2026
@stklcode
stklcode merged commit bcdb682 into develop Jun 19, 2026
19 checks passed
@stklcode
stklcode deleted the develop-submenu branch June 19, 2026 16:14
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants