TheWisker / Shikai

Modern lightdm webkit2 theme
https://thewisker.github.io/Shikai/
GNU General Public License v3.0
104 stars 6 forks source link

[Enhancement] Password Box Caret too tall #7

Closed TalinTheDev closed 1 year ago

TalinTheDev commented 1 year ago

Shikai Feature Request

Explanation

I have self-diagonosed OCD and in the password box, the caret touches the top and bottom edges of the box while the password hiders (idk if thats the word for it), the *, they are nicely centered. Is there a way to fix that. Tried messing around with index.css but that didn't really do anything.

Expected Behavior

Nothing really "expected", just think it doesn't look great.

Alternative Solutions

Make password box taller/decrease font-size/figure out how to use caret-color

Screenshots

2023-06-26-144659_1366x768_scrot

Additional Context

N/A

TheWisker commented 1 year ago

I did some web research and found out that the only way to accomplish this is to make use of a custom caret which is made with JavaScript: You hide the normal one and mimic it with JavaScript. As I am short of time today, I will implement this tomorrow, so look forward to an update!

Thanks for the enlightenment as I did not know that a caret was called a caret (I am Spanish) and when I was making the theme I wanted to fix this same problem but did not find anything on the web (I was searching with non-specific words) and gave up on fixing it.

P.D: I also use AwesomeWM it is amazing!

TheWisker commented 1 year ago

Lastly I did it!

After trying lots of workarounds I ended up with a fix which should be really cool as it is symmetric. This new release contains the changes and in around an hour they should be updated in the live demo.

At the end it was needed to rewrite a caret with JavaScript as CSS solutions did not work properly.

Be careful with this possible error when updating to the new version:

WARNING: This version contains changes in the settings so localStorage should be deleted to update as explained here

If everything looks good please close this issue to mark it as completed.

TalinTheDev commented 1 year ago

Hey, thanks for your effort, just one little thing that's easy to fix. If if hold shift to type in a uppercase letter, shift gets put into the box along with the letter. To fix this, where you have the logic to delete characters when backspace is pressed, just check if shift is pressed and if so, ignore the keystroke. I checked and the letter pressed after it is still capitalized so this shouldn't change the functionality.

Thanks so much!

P.S. I'm having some trouble switching users but am currently looking through my config and your code to see where the problem is so I'll keep you updated!

TalinTheDev commented 1 year ago

Also, there are a few minor things I would like to change in this such as the the width of the date so I can add PM\AM and I do know enough react.js to understand your code and edit it and don't wanna bother you with the little things so can you just tell me how to compile this myself with my edits? Thanks again!

TheWisker commented 1 year ago

Firstly, thanks for pointing out the shift flaw. I just fixed it along with other special keys like Escape that also got written as words when pressed. I just blindly forgot to add them to the array of ignored keys. I will soon release a new patch with that updated.

Then, about the trouble with switching users, as far as I know it should be a configuration mistake on your end, but as we never know please keep me updated so I can help with anything I can.

Finally, to compile the project you need nodejs and npm installed. Then you need to run the following commands from the project's root folder:

Then just keep in mind that the output HTML files will have the __is_debug variable set to true so when using with LightDM that needs to be set to false as explained in the manual installation section.

Lastly, if you make any changes that you deem worth of sharing it would be appreciated if you made a pull request with them following this guidelines. If they are too personal or not worth sharing do not bother yourself with it.

Appreciate the interest! TheWisker

TalinTheDev commented 1 year ago

Hi, I couldn't find anything about the switching but I'll try again tomorrow and figure it out. And okay thank you so much! That helps a lot and I'll definitely share if it could be useful to others. Thanks for a great greeter! And no problem for pointing it out. I'll keep you updated but for now I'll close this. Thanks for all your help!