Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

Improve docs for `navbar` using `lov` #1063

Open Dr-Irv opened 5 months ago

Dr-Irv commented 5 months ago

Description

In https://docs.taipy.io/en/develop/manuals/gui/viselements/navbar/, there is an example for using navbar with a list of values, but it is confusing (and possibly incorrect).

The example has this code for markdown:

<|navbar|lov={[("page1", "Page 1"), ("http://www.google.com", "Google")]}|>

The issue is that "page1" won't be found. So if you have pages that you have added to the application, via gui.add_pages({"page1" : some_markdown_text}), it won't reference "page1". So I think the correct example should be:

<|navbar|lov={[("/page1", "Page 1"), ("http://www.google.com", "Google")]}|>

It took me over an hour to figure this out!!

Acceptance Criteria

FlorianJacta commented 5 months ago

You are right @Dr-Irv! I am putting this issue to high priority as it could be pretty frustrating.

Satoshi-Sh commented 3 months ago

I can take on this issue. This should be taipy-doc repo, right?

FlorianJacta commented 3 months ago

@FabienLelaquais @FredLL-Avaiga Is this behavior planned to be changed?