Skip to content

Conversation

emlun
Copy link
Owner

@emlun emlun commented Aug 18, 2024

This is a meta-PR into:

@acolomb I believe this should address your review: syncthing#9175 (review)

Copy link

@acolomb acolomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like this a lot better. Could use some more spacing between the two options. Maybe even put a paragraph with a big fat --- or --- in between.

Comments are mostly about the HTML coding style. Please try to keep the diffs small and not needlessly reformat / wrap HTML code. I know it's hard to read as it is, but the diff with your wrapping changes just makes it much harder to see what's changing.

@acolomb
Copy link

acolomb commented Aug 19, 2024

Note that I haven't actually tested any WebAuthn logins yet. But code-wise it looks like a nice a clean solution with the local storage approach.

@emlun
Copy link
Owner Author

emlun commented Aug 19, 2024

Maybe even put a paragraph with a big fat --- or --- in between.

I tried this:

image

Personally I don't like it, I much prefer the look with the plain panels:

image

I also worry that the "OR" might get a bit janky when translated. For example in English, "or" and "Or" look visually unbalanced, so it should be "OR", so I put text-transform: uppercase for that sake. But in Swedish I would write "--- Eller ---" much rather than "--- eller ---" or "--- ELLER ---". So this would need a bespoke context-aware translation key just for this occurrence to account for typographic quirks like that.

Also, this particular HTML solution depends on flexbox, which I'm not sure we assume is supported by every user's browser? This would be very finnicky to make without flexbox, so I'd much prefer to just scrap it.

Could use some more spacing between the two options.

I've reused the same panel component as in the main GUI - should we really introduce this spacing difference between those uses?

@acolomb
Copy link

acolomb commented Aug 20, 2024

Yes, I think a difference in spacing is justified. In the main GUI, it's a list (repetition) of the same type of thing. Here, it's a contrast between two alternatives.

The horizontal line looks fine to me with its spacing. We could just leave out the "OR" text and only have the line. I agree that it's a headache in translations.

Sorry, I don't know what flexbox means and what the exact usage is. But adding some space via a CSS override should be easy and portable. Just as adding a <hr> in between.

Copy link

@acolomb acolomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job overall, I think with the additional spacing this will look awesome. Just two more small comments regarding HTML whitespace.

@emlun emlun requested a review from acolomb August 20, 2024 11:51
This padding decrease currently applies to _all_ collapsible panels, but this
padding decrease is not appropriate for all collapsible panels.
emlun added a commit to syncthing/syncthing that referenced this pull request Aug 21, 2024
#9659)

Transplanted from emlun#8 (meta-PR
into #9175) by request of
@acolomb (see:
emlun#8 (comment)).

This padding decrease currently applies to _all_ collapsible panels, but
this padding decrease may not be appropriate for all collapsible panels.
In particular, it will not be appropriate for the collapsible panels
introduced in emlun#8.
@emlun emlun requested a review from acolomb August 21, 2024 20:31
@emlun emlun merged commit a0d3542 into webauthn Aug 21, 2024
@emlun emlun deleted the webauthn-login-page branch August 21, 2024 20:42
@acolomb
Copy link

acolomb commented Aug 21, 2024

Actually, one more try at the alignment stuff... This is what it would look like if we add a panel-footer section and move the button and the checkbox into that:

image

Feel free to ignore or holler if you want me to propose the code changes if you like the look.

@emlun
Copy link
Owner Author

emlun commented Aug 25, 2024

The text is still not quite aligned correctly:

valign

But sure, you're very welcome to submit that as a meta-PR into syncthing#9175 if you prefer the look.

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