decky-loader icon indicating copy to clipboard operation
decky-loader copied to clipboard

Readme Access

Open VioletStorm opened this issue 1 year ago • 11 comments

Please confirm

  • [X] I have searched existing issues
  • [X] This issue is not a duplicate of an existing one
  • [X] This is not a request for a plugin

Feature Request Description

If a plugin has a readme, it can be viewed without needing to go through with a file manager.

Further Description

When a plugin has been opened from the list, an ℹ️ button is next to the plugin name up top. When pressed, it shows the text within the readme file, URLs are hyperlinked.

VioletStorm avatar Apr 19 '23 06:04 VioletStorm

This sounds pretty good, but I think instead of the readme, it should be possible to have multiple pages, and have translation support built in.

My current idea is: Each plugin can have a docs folder that contains several folders, each representing a page. Each folder then contains one or more markdown pages, with each one being a different language.

The pages are displayed with a SidebarNavigation component. Maybe there's a .json file somewhere that represents the order the pages are displayed in the sidebar?

The displayed page name has to go into the markdown file so it can be translated. Maybe first line is the title?

If multiple pages is unreasonable then they can just put the markdown files directly into the docs folder.

If there isn't a docs folder then it can just fall back onto the readme.md.

react-markdown seems to do a pretty good job, so probably use that.

The multiple pages thing isn't particularly needed, but I'd quite like to include translation support in this.

When I have some free time I'll do some tinkering with getting this working, because I'd really like this (no promises though!).

PartyWumpus avatar Apr 19 '23 07:04 PartyWumpus

~/homebrew/docs/{plugin}/{language code}/{page}.md

KP2048 avatar Apr 19 '23 11:04 KP2048

Or maybe ~/homebrew/plugins/{plugin}/docs/{language code}/{page}.md

KP2048 avatar Apr 19 '23 11:04 KP2048

Or maybe ~/homebrew/plugins/{plugin}/docs/{language code}/{page}.md

It'd be this yeah, and if /docs doesn't exist it would instead use /readme.md (case independent of course), or so I gather from PartyWumpus! ☺️

VioletStorm avatar Apr 19 '23 14:04 VioletStorm

~/homebrew/plugins/{plugin}/docs/{language code}/{page}.md

I think this one is best, as the data is only ever going to change when the plugin updates and it reduces the extra file management stuff required from decky

PartyWumpus avatar Apr 19 '23 15:04 PartyWumpus

Decky could add a parameterized route at /docs/:plugin and it would be a sidebar navigation with each page as a tab. Obviously localized and the default locale would be English when there isn't a translation for a page because internet

KP2048 avatar Apr 19 '23 15:04 KP2048

Devs could set up crowdin for their repos so that people can translate the docs

KP2048 avatar Apr 19 '23 17:04 KP2048

Devs could set up crowdin for their repos so that people can translate the docs

We could also perhaps offer plugin developers space on our Weblate instance.

AAGaming00 avatar Apr 19 '23 18:04 AAGaming00

Does weblate support markdown?

KP2048 avatar Apr 19 '23 22:04 KP2048

Does weblate support markdown?

Weblate does not appear to support markdown

Also, my work in progress version is now up (#432), although it will not work for now unless you manually modify it to remove the i18next depedency.

PartyWumpus avatar Apr 23 '23 13:04 PartyWumpus

Weblate does not appear to support markdown

Technically no, but it does support text files

KP2048 avatar Apr 23 '23 14:04 KP2048