Using the UserAgent string for detecting the platform is deprecated by Chrome
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
Describe the bug
From #2762 (comment) related to this code:
https://github.com/nextcloud/text/blob/a84d082de3ce888ffe7b68c764bddbf2ff45a193/src/components/Menu/keys.js#L1
navigator.platform is deprecated but using the user agent string is also deprecated by Chrome.
The future way of handling user agent related things is to use user agent client hints.
Currently client hints are not widely (currently missing Firefox and Safari) implemented, so this is bug is a reminder for possible future compatibility problems with chrome.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to src/components/Menu/keys.js and the related code at the linked commit; start by reading how platform detection is currently handled there. It identifies deprecated APIs and client hints as future compatibility concerns, but does not specify an implementation change or completion test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100