-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Conversation
with obfuscation using CSS.
visibility toggle a bit more to the left to not overlap with the scroll bar
The gulp looks like it might be related to an out of date web browser. Care to take a shot at updating the tests?
|
will take a look |
So I've checked some things and I'm starting to doubt it has anything to do with browser version or whatnot: I'll try to take a deeper dive into this tomorrow or in the near future. |
I'm unable to replicate the error in my environment. I've spun up a completely fresh install of Ubuntu 22.04, installed MongoDB, installed Redis / RabbitMQ, deployed ST2 3.9 unstable, cloned the repo, switched to the branch, ran all the commands required to do "gulp test" and everything works. Both unit tests and functional tests both work fine, no failures, 308 unit tests passed, 84 functional tests passed. How can I get access to replicate the CircleCI run locally? Do I need to be part of the org? Haven't work with CircleCI before. I want to be able to replicate the complete circleCI run on my machine using CircleCI tools without spinning up an EC2. There has to be something I can't see on my virtual machine. |
The circleci yaml https://github.com/StackStorm/st2web/blob/master/.circleci/config.yml describes the process used to test on CircleCI. If you look at the build logs on CircleCI for the commit that failed you can see how the environment is composed, e.g. linux distribution, the environment variables, nodejs version etc. |
the "show secrets" button works
😎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed review. Just a couple of questions before I approve.
-
Would you please post screenshots of what the secret fields look like with this change?
-
Does the visibility button appear on all fields or just on secret fields?
Aside: This will probably fix other issues I've had with secrets fields, like the browser trying to autofill my st2 user+password when running an action. Exciting!
by increasing the padding from the right side to 36px
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet. This should be a big improvement.
before this is merged please let me play around with the icon positioning. it being off-center irks me. |
increased max-height of textarea to 100px and increased padding from the right side to 40px from 36px to appear less crowded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Are you ready for me to merge this?
Yes. Nothing for me to add to this one. |
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
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.