Skip to content

Change to secret inputs in response to #6338 in st2 #1035

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fdrab
Copy link

@fdrab fdrab commented Jul 21, 2025

Changes made:

1, removed password field type as it no longer serves any purpose. only the base primitive types are left (string / number / int...)
2, added a wrapper

block around inputs to display a visibility toggle button to align centrally
3, secrets are now obfuscated using -webkit-text-security and this can be toggled by clicking on an "eye" icon.
4, if a field is marked as secret and the secret is not shown via visibility toggle, spellcheck is disabled
5, if input is secret, validation returns "*".repeat(v.length) instead of the value for types that return value in the error message
6, moved the "eye" icon a bit to the right to not overlap with the scrollbar

Feedback is welcome, I'm not a very good developer and I may not know all the things there is to know and may have missed something. These changes were tested in firefox / Edge and Chrome.

My 'gulp test' fails due to binding issues (TypeError: bind EINVAL 0.0.0.0). If anyone knows how to get around that, I'm all ears.

fdrab added 2 commits July 21, 2025 19:29
visibility toggle a bit more to the left
to not overlap with the scroll bar
@nzlosh
Copy link
Contributor

nzlosh commented Jul 22, 2025

The gulp looks like it might be related to an out of date web browser. Care to take a shot at updating the tests?

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
/home/circleci/project/node_modules/react-textarea-autosize/dist/react-textarea-autosize.cjs.js:16
var isIE =  _isBrowser ? !!document.documentElement.currentStyle : false;

@nzlosh nzlosh requested a review from a team July 22, 2025 14:45
@fdrab
Copy link
Author

fdrab commented Jul 22, 2025

The gulp looks like it might be related to an out of date web browser. Care to take a shot at updating the tests?

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
/home/circleci/project/node_modules/react-textarea-autosize/dist/react-textarea-autosize.cjs.js:16
var isIE =  _isBrowser ? !!document.documentElement.currentStyle : false;

will take a look

@fdrab
Copy link
Author

fdrab commented Jul 22, 2025

So I've checked some things and I'm starting to doubt it has anything to do with browser version or whatnot:
1, when I run the command that failed (npm run test-unit) in my virtualbox, all 308 tests pass
2, I've run the above mentioned command to update the browserslist and even though it was reported as success, the yarn.lock file wasn't updated with proper versions, so it still thinks that it's old, for some reason.
3, my subsequent PR for sanitizing the preview in actions succeeded, which suggests that there is no issue with browser or tests as they are (perhaps except for the fact that zombie is no longer updated and is an archived repo)

I'll try to take a deeper dive into this tomorrow or in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants