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

Add dynamic activation for documentation page menu items #4

Open
erdoganbulut opened this issue Jan 20, 2022 · 0 comments
Open

Add dynamic activation for documentation page menu items #4

erdoganbulut opened this issue Jan 20, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@erdoganbulut
Copy link
Contributor

erdoganbulut commented Jan 20, 2022

https://github.com/sdtrdev/paymple-ui/blob/develop/src/routes/Documentation/index.tsx

<Menu
  mode="inline"
  defaultSelectedKeys={['1']}
  defaultOpenKeys={['sub1']}
  style={{ height: '100%' }}
>

[en]

There is a default selected menu item, when the user visits any of the document pages.

The Documentation-Home page is still selected, when the user directly visits a sub-document page such as privacy-policy. However, if he clicks on another page from the menu, the menu-item of the page he clicked becomes active and goes to that page.

There is an error here. The menu-item becomes active because the user clicks on the menu-item. In fact, it should be active because it is on that page. Thus, even if the user visits a sub-page directly, the relevant menu-item will be active.

We should make this field dynamic according to the page the user is active on.

[tr]

Kullanıcı döküman sayfalarından herhangi birini ziyaret ettiğinde, default seçili menü item vardır.

Kullanıcı direkt olarak privacy-policy gibi alt bir döküman sayfasını ziyaret ettiğinde, yine de Documentation-Home sayfası seçili oluyor. Ancak menüden başka bir sayfaya tıklarsa, tıkladığı sayfanın menu-item'ı aktif oluyor ve o sayfaya gidiyor.

Burada bir hata var. Menu-item kullanıcı menu-item'a tıkladığı için aktif oluyor. Aslında o sayfada bulunduğu için aktif olması lazım. Böylelikle kullanıcı alt bir sayfayı bile doğrudan ziyaret etse, ilgili menu-item aktif olacaktır.

Bu alanı kullanıcının aktif olduğu sayfaya göre dinamik hale getirmeliyiz.

@erdoganbulut erdoganbulut added enhancement New feature or request good first issue Good for newcomers labels Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant