Skip to content

Package code page: mobile version improvements #1942

@alex-key

Description

@alex-key

Describe the bug

There are several issues in mobile version of package-code page (nuxt@4.3.1)

  • In bigger files with 1000+ lines "Scroll to top" button becomes two-lines, which makes the whole row wider and does not look good (SS1). Proposal: For mobile devices use "To top" copy or just move button next to "Open files" button on bottom right of the screen (which imo is more intuitive placement of that button on mobile) Example from nitro
Image
  • In Readme file we have additional switcher - group of 2 buttons which breaks the design, raw button pushed out of viewport (SS2). Proposal: use only icons for the switcher and make it compact OR break into 2 lines Example from nitro
  • Longer folder names becomes could increase navigation row hieight x3 (and more) (SS3). Proposal: use truncation OR break navigation row into multiple rows and keep each individual item single line (and maybe also use truncation for super-long folder names) Example from core-js
  • (to discuss) I think we should find something better than "root" name for the root folder (SS4). For me this "root" does not feel intuitive at all. Proposal: use package name OR use "@" OR use some icon instead (Home or Folder)
  • [both desktop and mobile] Even files with a short content still have scrolling for no reason (SS5) Example from nitro
  • [both desktop and mobile] Skeleton loaders should be shown instead of empty state on page refresh. Optional: empty state for a file should be "No such file" (SS6) Example from nitro

Additional context

Used Chrome mobile emulator for Galaxy S20 Ultra

Screenshots

SS1 - Action buttons row
Image

SS2 - Readme additional buttons
Image

SS3 - Long directory names
Image

SS4 - Root?
Image

SS5 - Useless scroll
Image

SS6 - Empty state is shown on loading
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontFrontend, DesignuxRelated to wider UX decisions

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions