nextcloud / nextcloud/text

Using the UserAgent string for detecting the platform is deprecated by Chrome

Open
#2,770 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop technical debt
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.