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

META Gnoweb UI Improvements #3355

Open
moul opened this issue Dec 17, 2024 · 20 comments
Open

META Gnoweb UI Improvements #3355

moul opened this issue Dec 17, 2024 · 20 comments
Assignees
Labels
🐞 bug Something isn't working 🌟 improvement performance improvements, refactors ...

Comments

@moul
Copy link
Member

moul commented Dec 17, 2024

Centralizing here some feedback about the new Gnoweb UI.

@moul moul added 🐞 bug Something isn't working 🌟 improvement performance improvements, refactors ... labels Dec 17, 2024
@moul
Copy link
Member Author

moul commented Dec 17, 2024

Add a way to easily see which network we are running on. This could be a ribbon or another indicator.

We need distinct values for the portal, testnets, and local (gnodev).

Bonus: subtle custom CSS allows us to have a gentle background color to quickly identify the portal, local, and other options.

@moul
Copy link
Member Author

moul commented Dec 17, 2024

CleanShot 2024-12-17 at 17 19 47

Use alt or a similar key to identify the buttons when hovering the mouse over them.

@moul
Copy link
Member Author

moul commented Dec 17, 2024

CleanShot 2024-12-17 at 17 21 08

When empty, remove the block or add text explaining why it is empty.

@moul
Copy link
Member Author

moul commented Dec 17, 2024

Strange vertical alignment
CleanShot 2024-12-17 at 17 48 48

@moul
Copy link
Member Author

moul commented Dec 17, 2024

bug breaking txlink:

CleanShot.2024-12-17.at.17.50.55.mp4

@moul
Copy link
Member Author

moul commented Dec 17, 2024

Lack of cookie for the key/address.

CleanShot.2024-12-17.at.17.52.04.mp4

@kazai777
Copy link
Contributor

It would be nice to have dark mode

thehowl pushed a commit that referenced this issue Dec 17, 2024
This PR aims to fix some of remaining UI bugs on gnoweb after the revamp
merge.

Some of: #3355

- Fixes Safari select input design and icons
- Fixes input hover
- Fixes ToC font style
- Fixes UI details and improve CSS
- Fixes Responsive with long content
- Fixes Scrollbar
- Fixes fonts loading strategy and size
- Fixes ts issue with copy btn (quick clicks)
- Fixes some A11y
n0izn0iz pushed a commit to TERITORI/gno that referenced this issue Dec 17, 2024
This PR aims to fix some of remaining UI bugs on gnoweb after the revamp
merge.

Some of: gnolang#3355

- Fixes Safari select input design and icons
- Fixes input hover
- Fixes ToC font style
- Fixes UI details and improve CSS
- Fixes Responsive with long content
- Fixes Scrollbar
- Fixes fonts loading strategy and size
- Fixes ts issue with copy btn (quick clicks)
- Fixes some A11y
thehowl pushed a commit that referenced this issue Dec 18, 2024
Adds JavaScript features listed #3355 regarding Help section in gnoweb.

- Adds localStorage feature for address
- Fixes txlink
- Minor UI styles
@leohhhn
Copy link
Contributor

leohhhn commented Dec 18, 2024

We should see if we can somehow make the page a little less empty when there is little or no content, like for example here: https://gno.land/r/docs/hello

Also, in this specific case above, the TOC is not shown even though the text is H1

omarsy pushed a commit to omarsy/gno that referenced this issue Dec 18, 2024
This PR aims to fix some of remaining UI bugs on gnoweb after the revamp
merge.

Some of: gnolang#3355

- Fixes Safari select input design and icons
- Fixes input hover
- Fixes ToC font style
- Fixes UI details and improve CSS
- Fixes Responsive with long content
- Fixes Scrollbar
- Fixes fonts loading strategy and size
- Fixes ts issue with copy btn (quick clicks)
- Fixes some A11y
omarsy pushed a commit to omarsy/gno that referenced this issue Dec 18, 2024
Adds JavaScript features listed gnolang#3355 regarding Help section in gnoweb.

- Adds localStorage feature for address
- Fixes txlink
- Minor UI styles
@stefann-01
Copy link
Contributor

Naming auto-generated function calls for realms as 'docs' isn't very intuitive. It took me a few minutes to realize what it was. I initially thought it would lead to a general documentation page.

@leohhhn
Copy link
Contributor

leohhhn commented Dec 19, 2024

Inline code does not match font size of other text when in H1,H2, etc

Screenshot 2024-12-19 at 13 42 39

moul pushed a commit that referenced this issue Dec 19, 2024
Continue fixing the issues reported in #3355 mainly:

- Colors a11y issues
- Directory layout 
- Copy btn style 
- code element font-size to follow parent's one
albttx pushed a commit that referenced this issue Jan 10, 2025
This PR aims to fix some of remaining UI bugs on gnoweb after the revamp
merge.

Some of: #3355

- Fixes Safari select input design and icons
- Fixes input hover
- Fixes ToC font style
- Fixes UI details and improve CSS
- Fixes Responsive with long content
- Fixes Scrollbar
- Fixes fonts loading strategy and size
- Fixes ts issue with copy btn (quick clicks)
- Fixes some A11y
albttx pushed a commit that referenced this issue Jan 10, 2025
Adds JavaScript features listed #3355 regarding Help section in gnoweb.

- Adds localStorage feature for address
- Fixes txlink
- Minor UI styles
albttx pushed a commit that referenced this issue Jan 10, 2025
Continue fixing the issues reported in #3355 mainly:

- Colors a11y issues
- Directory layout 
- Copy btn style 
- code element font-size to follow parent's one
@leohhhn
Copy link
Contributor

leohhhn commented Jan 13, 2025

  1. Please add a back button!
  2. We should make imports in the source tab clickable; depending on the domain set in the gnoweb config, the urls generated would differ:

if gnoweb's config has test5.gno.land -> an import, such as "gno.land/r/leon/hof" would be clickable with the url test5.gno.land/r/leon/hof

@leohhhn
Copy link
Contributor

leohhhn commented Jan 16, 2025

It seems that with a ?query inside of the path, the source/docs buttons don't work properly - clicking them adds to $source or $help to the url, but doesn't actually switch to the tab.

You can check on https://gno.land/r/docs/avl_pager

Image

@leohhhn
Copy link
Contributor

leohhhn commented Jan 16, 2025

Seems someone broke the TOC click to jump to anchor! Currently clicking just adds a single # to the url.

edit: fixed

@leohhhn
Copy link
Contributor

leohhhn commented Jan 17, 2025

Seems strikethrough is also not rendered on gnoweb currently, similarly to how tables were disabled. Should we check for some other elements as well?

Image

EDIT: solved

@leohhhn
Copy link
Contributor

leohhhn commented Jan 17, 2025

In the docs page, when user inputs for functions contain !, and possibly ?, generated commands sometimes omit a closing ", which makes them invalid. I remember in the old version of gnoweb that ! was always escaped.

EDIT: solved

@matijamarjanovic
Copy link
Contributor

Hey, this case should maybe be covered with appropriate message(when trying to access the "docs" tab for a package):

Image

moul added a commit that referenced this issue Feb 4, 2025
This realm is a good example of reusing and integrating some of my
recently added libraries:

-  `p/moul/md` #2819 
-  `p/moul/mdtable` #3100 
-  `p/moul/realmpath` #3257 
-  `p/moul/txlink` #3289 
-  `p/moul/collection` #3321 
-  `p/demo/avl/pager` #2584 

It helped me identify that `txlink` was not escaping the arguments,
which resulted in invalid links. (fixed in #3682)

Additionally, it provided me with a better understanding of:

- The shortcomings of the `p/moul/md` API, particularly regarding `"\n"`
handling
-  The need for improved management of the pager for `p/moul/collection`
- What kind of UI improvements we could need on gnoweb. #3355 

Demo: 



https://github.com/user-attachments/assets/4b20cee8-b8d7-4eba-90a8-5b87a3c19521



I also suggest you to look at the `filetest.gno` file.

I believe we should proceed with the merge, to inspire others to create
similar composed realms.

However, I have a few improvement ideas:
1. Extract most of the generic logic into a `p/moul/present`.
2. Consider either making r/moul/present importable by
`r/coreteam/present` to create a hub for presentations from all
teammates, or the opposite: make `r/coreteam/present` the content source
and allow `r/moul/present` to display a subset where `author="moul"`
What are your thoughts?
3. Clean up the code using an improved `p/moul/md` and possibly new `p/`
generic utilities.

Depenes on #3682

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
thehowl pushed a commit that referenced this issue Feb 6, 2025
This PR ensures that special characters like ! and ? in user inputs are
properly escaped when generating commands in the docs page ($help).
Previously, entering ! or any other special char could cause the command
string to break by omitting a closing ", making it invalid.

This fix applies proper escaping to prevent such issues, ensuring that
generated commands remain valid and executable.

The fix introduces an escaping function that handles shell-sensitive
characters before inserting them into the generated command strings.
This approach ensures the commands remain intact without affecting their
output when executed. Thus, the escape char is also removed from the cmd
when the shell-sensitive char is removed from the arg input.

cf: [issue
3355](#3355 (comment))
gfanton added a commit that referenced this issue Feb 7, 2025
This PR fixes an issue where gnoweb URLs contain both a query (? prefix)
and a gnowebquery ($ prefix). Previously, the header links appended the
gnowebquery after the query, whereas it should be placed before the
query. This update ensures the correct ordering of URL components.

cf issue:
#3355 (comment)

---------

Co-authored-by: Guilhem Fanton <8671905+gfanton@users.noreply.github.com>
@leohhhn
Copy link
Contributor

leohhhn commented Feb 7, 2025

Let's add copy buttons and codelines to all rendered codeblocks. I see now downside to this. Any thoughts?

@leohhhn
Copy link
Contributor

leohhhn commented Feb 13, 2025

Would be cool to get some better data under the titles when searching on google. I assume this is something we could achieve with realm metadata, no? Anyways, even with no metadata, maybe we could set some default text?

Also, change the title of the website to lowercase gno.land :)

Image

@alexiscolin
Copy link
Member

Yeah I have an issue for that. I plan to tackle this meta data PR next week!👍

@alexiscolin
Copy link
Member

@leohhhn cc #3333

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🌟 improvement performance improvements, refactors ...
Projects
Status: Triage
Development

No branches or pull requests

6 participants