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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull theme-color from nodeinfo instead of HTML/PWA config #8897

Closed
FloatingGhost opened this issue Jun 27, 2022 · 4 comments 路 Fixed by #8977
Closed

Pull theme-color from nodeinfo instead of HTML/PWA config #8897

FloatingGhost opened this issue Jun 27, 2022 · 4 comments 路 Fixed by #8977
Labels
鉁‵eature This adds/improves/enhances a feature packages/backend Server side specific issue/PR

Comments

@FloatingGhost
Copy link

FloatingGhost commented Jun 27, 2022

馃挕 Summary

Currently, theme-colour, used for the banner on posts, is pulled from:

  • HTML meta tags on the / path
  • A PWA-specific manifest.json property

These should be considered instance-internal paths and should not be used for federated information

馃グ Expected Behavior

Theme-color should have a fallback (or, priority?) in the nodeinfo - metadata.nodeAccentColor? (take your pick on the actual property)

@FloatingGhost FloatingGhost added the 鈿狅笍bug? This might be a bug label Jun 27, 2022
@Johann150 Johann150 added 鉁‵eature This adds/improves/enhances a feature packages/backend Server side specific issue/PR and removed 鈿狅笍bug? This might be a bug labels Jun 27, 2022
@Johann150
Copy link
Contributor

Johann150 commented Jun 27, 2022

The <meta name="theme-color" value="..." /> tag is part of the HTML Living Standard and is set on most client paths.

meta(name='theme-color' content= themeColor || '#86b300')

Using nodeinfo metadata for things like this seems like a bad idea to me because unlike for example JSON-LD you can not uniquely define what the semantics of a property are supposed to be.

@FloatingGhost
Copy link
Author

The tag is part of the HTML Living Standard and is set on most client paths.

this is true, but note that it says "clients", i don't think that remote servers should be relying on the frontend of other instances to provide identifying information; this will break if the instance does not provide a frontend or PWA

unlike for example JSON-LD you can not uniquely define what the semantics of a property are supposed to be.

that's fine though - http://nodeinfo.diaspora.software/ns/schema/2.1

according to the schema, "description": "Free form key value pairs for software specific values. Clients should not rely on any specific key present.",

it feels awfully fragile to rely on something a remote server only intends to be used for clients that attach directly to it

@Johann150
Copy link
Contributor

Johann150 commented Jun 28, 2022

The standard says "user agents" not "clients", and I don't think you specify what Misskey's "intent" is. :P

My issue is that using "free form key value pairs for software specific values" means the meaning is not well defined and I do not see how that is any less fragile. Would you not have to check the software name (and maybe also version) to find out what the intended meaning of a field is supposed to be? And keep a list of other softwares?

@FloatingGhost
Copy link
Author

and misskey isn't a user agent, is my point, instance information pulls aren't user-initiated

if you want information about remote instances, you should ask it, instead of scraping from its client - it'd be a bit silly for me to pull the <title> property to get info that can be given by nodeName

otherwise you force other frontend implementations (not backend AP implementations) to add compatibility with your way of doing things, which is a bit bizarre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
鉁‵eature This adds/improves/enhances a feature packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants