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

[Enhancement] generalize active menu highlight feature #5217

Open
pxpm opened this issue Jul 18, 2023 · 1 comment
Open

[Enhancement] generalize active menu highlight feature #5217

pxpm opened this issue Jul 18, 2023 · 1 comment
Assignees
Labels
enhancement Minor Bug A bug that happens only in a very niche or specific use case. next-version Priority: SHOULD Size: M 1 week Size: S 1 day

Comments

@pxpm
Copy link
Contributor

pxpm commented Jul 18, 2023

We have a little problem in our active menu highlight feature.

At the moment each theme implements their own active menu selector script, that leads to inconsistencies and bugs that happen in one theme, but work in other.

We still have a problem that menu-item and menu-item?active=1 don't work properly when used as menu urls, and to fix it, we need to push a fix to multiple places.

Ideally we would create a script that can be used by any theme, centralized in CRUD project.

Tabler - https://github.com/Laravel-Backpack/theme-tabler/blob/2e42a5a04d09adb471878e0cf9b037b02025a30c/resources/assets/js/tabler.js#L6

CoreUI v4 - ??? This commit removed the code: Laravel-Backpack/theme-coreuiv4@186ce28#diff-dc68994fe916561a3ed4f9f83658f0ee593f26c61d2d3cea03c1497a9b4da20f

I tried to search the repo for some removed code but couldn't find it: https://github.com/search?q=repo%3ALaravel-Backpack%2Ftheme-coreuiv4%20sidebarTransition&type=code

CoreUI v2 - https://github.com/Laravel-Backpack/theme-coreuiv2/blob/0c66d9a17bc0010335319b080004800a8bd40f8c/resources/views/inc/sidebar.blade.php#L62

Let me know what you think about this @tabacitu

Cheers

@pxpm pxpm added the triage label Jul 18, 2023
@pxpm pxpm added enhancement Minor Bug A bug that happens only in a very niche or specific use case. and removed triage labels Jul 18, 2023
@pxpm pxpm removed this from This week Jul 18, 2023
@tabacitu
Copy link
Member

Hmm...

  • If it's an S, yes
  • if it's an M, maybe
  • if it can be 2x M, no

😀

I think some JS in our "UI" is inevitable, and could be useful to theme developers yes:

  • js to make the menu items active or not; and maybe check which item is already active if any;
  • js to turn dark mode on/off/system (if bootstrap doesn't already have one);

I'll think about this again when I finish the Bootstrap theme (1-2 weeks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Minor Bug A bug that happens only in a very niche or specific use case. next-version Priority: SHOULD Size: M 1 week Size: S 1 day
Projects
Development

No branches or pull requests

2 participants