reanahub / reana-ui

REANA UI frontend
http://reana-ui.rtfd.io
MIT License
4 stars 33 forks source link

profile: import token shadowing #316

Open tiborsimko opened 1 year ago

tiborsimko commented 1 year ago

Current behaviour

The "Your profile" page hides the user token via shadowing:

shadow

And clicking on the icon allows to reveal the secret.

However, when a user uses a browser with Dark Reader extension, the shadowing does not work.

Expected behaviour

The shadowing should work with the Dark Reader mode being either "on" or "off" equally well.

Let's try to find the colour configuration and/or another shadowing solution.

(reported by @klieret)

giuseppe-steduto commented 1 year ago

The problem arises in the "Dynamic" mode of the Dark Reader extension, but the website appears to work fine in the "Filter"/"Filter+" mode. This is due to the fact that the Dynamic mode analyzes the page and tries to edit the stylesheets so that there is always a contrast high enough to read the text comfortably. Since our shadowing method works by making the background color of the token the same as the text color, it doesn't work with Dynamic Dark Reader.

This probably could be solved using other shadowing techniques, like changing the characters or using some non-standard typeface.

In the meanwhile, however, there are some patches that could be considered: