grass icon indicating copy to clipboard operation
grass copied to clipboard

[Bug] SEO problems on mobile devices with the GRASS GIS manual pages

Open neteler opened this issue 3 years ago • 16 comments

Describe the bug There are notable SEO problems on mobile devices with the GRASS GIS manual pages.

image

  • Text too small to read
    • see: https://support.google.com/webmasters/answer/9063469#small_font_size
  • Clickable elements too close together
    • see: https://support.google.com/webmasters/answer/9063469#touch_elements_too_close
  • Viewport not set
    • see: https://support.google.com/webmasters/answer/9063469#viewport_not_configured
  • Content wider than screen
    • see: https://support.google.com/webmasters/answer/9063469#content_not_sized_to_viewport

Random example: https://search.google.com/test/mobile-friendly/result?id=nIc8LtrwxGgKXYAouSsizw&hl=en --> https://grass.osgeo.org/grass82/manuals/r.walk.html

image

Expected behavior

The manual pages should be responsive, i.e. mobile friendly.

Proposed solution for "Viewport not set"

It appears that fixing "Viewport not set" seems solvable by simply adding the next line to the page header:

<meta name="viewport" content="width=device-width, initial-scale=1">

which is easy to do here as in an additional line 42:

https://github.com/OSGeo/grass/blob/841e0b39811083e1b86b93b5500864d3f1558a1a/man/build_html.py#L41

Result of a test

Current state without viewport:

  • content not readable

image

Potential fix with viewport:

  • content readable
  • menu is gone (but not really useful anyway on narrow mobile devices)

image

If the viewport meta line makes sense I can open a PR.

neteler avatar Sep 25 '22 18:09 neteler

* menu is gone (but not really useful anyway on narrow mobile devices)

Maybe we could replace this menu with hamburger menu (HTML + CSS but without JavaScript), example is here https://dev.to/ljcdev/hamburger-css-no-js-2dfa and https://codepen.io/ljc-dev/pen/NWxJezy. What do you think @neteler?

tmszi avatar Oct 02 '22 17:10 tmszi

Interesting idea!

neteler avatar Oct 02 '22 18:10 neteler

The "Viewport not set" issue has been addressed in main (for the upcoming G8.3.0), releasebranch_8_2 (for the upcoming G8.2.1), and releasebranch_7_8 (for the upcoming G7.8.8). The other issues are still open.

neteler avatar Oct 03 '22 10:10 neteler

Module manual with hamburger menu (hamburger menu icon is showed for screen with width < 1023.99 px and for screen width > 1023.99 original right TOC menu is preserved).

Example r.basin.fill module:

Hamburger menu icon (screen width < 1023.99 px):

module_manual_with_hamburger_menu_icon

Hamburger menu (screen width < 1023.99 px):

module_manual_with_showing_hamburger_menu

Preserved right TOC menu (screen witdh > 1023.99 px):

module_manual_with_preserved_right_toc_menu

Hamburger menu icon and menu close icon (SVG format) is drawed be me in the Inkscape, with color which respect GRASS GIS brand.

Example r.basins.fill module HTML man page I attached in the ZIP archive module_html_man_with_hamburger_menu.zip

How to test:

A. Localhost

  1. unzip module_html_man_with_hamburger_menu.zip
  2. firefox-bin module_html_man_with_hamburger_menu/r.basins.fill.html
  3. Mozilla Firefox Ctrl + Shift + M the keyboard shortcut for responsive design
  4. Change screen layout width < 1024 px

B. Upload HTML example page into our Apache web server

  1. Test example HTML page on the tablet or mobile device screen

tmszi avatar Oct 03 '22 13:10 tmszi

For easier testing with Desktop and mobile, I have copied it here:

https://data.neteler.org/tmp/module_html_man_with_hamburger_menu/r.basins.fill.html

neteler avatar Oct 03 '22 18:10 neteler

Hamburger menu (screen width < 1023.99 px):

Works pretty well on my mobile phone! Could the vertical empty space be removed (i.e., make it more compact)?

neteler avatar Oct 03 '22 19:10 neteler

Could the vertical empty space be removed (i.e., make it more compact)?

Something like that (reduced height of empty space between links)?

menu_with_reduced_height_of_empty_space_between_links

grassdocs.zip

tmszi avatar Oct 04 '22 03:10 tmszi

Thanks, updated here for easy inspection: https://data.neteler.org/tmp/module_html_man_with_hamburger_menu/r.basins.fill.html

neteler avatar Oct 04 '22 07:10 neteler

This is how it looks like on my phone - does not seem responsive when I zoom in further: image

How to get a responsive zoom level to make it more readable? I liked the zoom level in the last screenshot of @neteler's proposed fix with viewport

veroandreo avatar Oct 04 '22 11:10 veroandreo

This is how it looks like on my phone - does not seem responsive when I zoom in further

Yes, you are right. This example HTML source code is without @neteler PR #2591 (without fixed viewport).

How to get a responsive zoom level to make it more readable?

Could @neteler upload this example HTML r_basins_fill_html.zip (with fixed viewport) please? Thanks.

tmszi avatar Oct 04 '22 12:10 tmszi

Could @neteler upload this example HTML r_basins_fill_html.zip (with fixed viewport) please? Thanks.

Done: https://data.neteler.org/tmp/module_html_man_with_hamburger_menu/r.basins.fill.html

neteler avatar Oct 04 '22 15:10 neteler

Could @neteler upload this example HTML r_basins_fill_html.zip (with fixed viewport) please? Thanks.

Done: https://data.neteler.org/tmp/module_html_man_with_hamburger_menu/r.basins.fill.html

muuuch better now :)

veroandreo avatar Oct 04 '22 15:10 veroandreo

The "Viewport not set" issue has been addressed in main (for the upcoming G8.3.0), releasebranch_8_2 (for the upcoming G8.2.1), and releasebranch_7_8 (for the upcoming G7.8.8).

This change has good impact!

image

neteler avatar Oct 19 '22 08:10 neteler

Could @neteler upload this example HTML r_basins_fill_html.zip (with fixed viewport) please? Thanks.

@tmszi would you be willing to submit the mobile menu change as a PR?

neteler avatar Oct 19 '22 20:10 neteler

@tmszi would you be willing to submit the mobile menu change as a PR?

Yes of course PR #2606.

tmszi avatar Oct 21 '22 20:10 tmszi

FYI: The current state (SEO could still be improved) - compare to above plot:

image

neteler avatar Oct 04 '23 21:10 neteler

Closing as it is pretty ok now.

neteler avatar Jun 14 '24 13:06 neteler