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

Request for Menu Customization Feature #5205

Open
paulo-rossy opened this issue Sep 10, 2024 · 1 comment
Open

Request for Menu Customization Feature #5205

paulo-rossy opened this issue Sep 10, 2024 · 1 comment

Comments

@paulo-rossy
Copy link
Contributor

Hello!

In my project, I would like to remove certain menu sections, particularly the "Accruals and payments" section. However, there is currently no functionality to simply disable this menu item. Could you add logic for menu items similar to how the "marketplace" menu item is handled?

Example:

condo/.env

FEATURE_TOGGLE_CONFIG='{"marketplace":{"defaultValue":true,"rules":[{"condition":{"organization":{"$in":[""]}},"force":true}]}}'

_app.tsx

const isMarketplaceEnabled = useFlag(MARKETPLACE)

{
    key: MARKET_CATEGORY,
    items: [
        {
            id: 'menuitem-marketplace',
            path: 'marketplace',
            icon: AllIcons['Market'],
            label: 'global.section.marketplace',
            access: isMarketplaceEnabled && hasAccessToMarketplace && isNoServiceProviderOrganization,
        },
    ].filter(checkItemAccess),
}

If needed, I can open a pull request with the suggested changes.

Thank you in advance for considering this feature!

@toplenboren
Copy link
Member

Hi, @paulo-rossy, Overall this idea sounds OK 👍

I'd have implemented it like this:

  1. Lets create a feature flag that stores JSON with side menu configuration. So that you do not tweak singular menu items, but can override whole menu..

Will it be OK for your usecase?

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

No branches or pull requests

2 participants