Topic-icon SCLogin Show Forgot Username / Password - Bugs + fixings

Active Subscriptions:

None
2 years 2 months ago - 2 years 2 months ago #67828 by joomleb
Hi guys,
testing PHP 7.4.27 + Joomla 3.10.6 (Helix Ultimate 1.1.4) + JFBConnect last 9.x (SCLogin)

1 - SCLogin Module > Login View Settings >
Theme: Default
Layout: Vertical
Show Forgot Username and/or Show Forgot Password: White button (in my case) - Anyway, here the options are:
- None - nothing is shown - Okay
- Black button - btn btn-secondary - Okay
- White button - btn btn-secondary - Bug, It should be btn btn-light - right now it is adding a “icon-white” class to the FA icon class
- Text link - nothing is shown - bug ?!?
The “btn-secondary” class seems to be always fixed for the a showpasswd / a forgot - I add an image
Now, it would be good also to add an option that add just “btn”, but, considering that the “Style” tab feature has yet been added, maybe would be better to have just a “SCLogin Module > Login View Settings > Show Forgot Username and/or Show Forgot Password: Button class” selection (instead of black and white) and by adding a “Username Button CSS Class” / “Password Button CSS Class” fields into the Style tab.
Please, Can you confirm the bug and fix it ?
Please, Where can I manually edit the "btn-secondary" ?

2 - Into the Style tab would be better to replace the word "button" with "icon" in all the fields you have right now, like:
Show Password Button CSS Class > Show Password Icon CSS Class OR Show Password Icon FA Class
Are you agree ?

3 - I’m experiencing a not horiontally alignment of the buttons with Username / Password fields - I add an image. I’m able to “solve” it by adding “display: inline-flex;”, maybe, Can it be added by default ?
.input-append.input-block-level {
display: inline-flex;
}

4 - By using as “showpasswd” FA icon
- Style tab > Show Password Button CSS Class: far fa-eye
- Style tab > Hide Password Button CSS Class: fas fa-eye-slash
When clicking the password field border is moved to the left, you can test it also on your site. It can be fixed by adding a “width: 1.1rem;”:
…/media/sourcecoast/themes/sclogin/default.css
.sclogin.ns-bs2 .field-icon {
position: relative;
z-index: 2;
font-size: 1rem;
width: 1.1rem;
}
Anyway, the “showpasswd” FA icon, for a really better understanding and viewing, it should be inside the "password" field - I add an image - Are you agree ? Please, Do you have a workaround for it ?

5 - The “forgot” FA icon is not vertically aligned. As far as I see by excluding the “vertical-align: middle;” would solve the issue - Can it be added by default ? (I cannot test it on J4 right now)
…/media/sourcecoast/themes/sclogin/default.css
.sclogin.ns-bs2 .field-icon {
position: relative;
z-index: 2;
font-size: 1rem;
}
.sclogin.ns-bs2 a.forgot.btn i {
margin-top: 0;
/* vertical-align: middle; */
font-size: 1rem;
}
Attachments:
Last edit: 2 years 2 months ago by joomleb.
The topic has been locked.
Active Subscriptions:

None
Hi guy, 
meanwhile, about point 1, Please, Where, what is the file, can I manually edit the "btn-secondary" ? (See previous attached image)
The topic has been locked.
Support Specialist
2 years 2 months ago - 2 years 2 months ago #67845 by mel

1 - SCLogin Module > Login View Settings >
Theme: Default
Layout: Vertical
Show Forgot Username and/or Show Forgot Password: White button (in my case) - Anyway, here the options are:
- None - nothing is shown - Okay
- Black button - btn btn-secondary - Okay
- White button - btn btn-secondary - Bug, It should be btn btn-light - right now it is adding a “icon-white” class to the FA icon class
- Text link - nothing is shown - bug ?!?
The “btn-secondary” class seems to be always fixed for the a showpasswd / a forgot - I add an image
Now, it would be good also to add an option that add just “btn”, but, considering that the “Style” tab feature has yet been added, maybe would be better to have just a “SCLogin Module > Login View Settings > Show Forgot Username and/or Show Forgot Password: Button class” selection (instead of black and white) and by adding a “Username Button CSS Class” / “Password Button CSS Class” fields into the Style tab.
Please, Can you confirm the bug and fix it ?
Please, Where can I manually edit the "btn-secondary" ?


* I agree that adding a class for the buttons would be better than btn-secondary being hardcoded. This would also allow better flexibility for different Bootstrap versions.
* btn-light is not in BS2 but I think this is a moot point if we'll be adding a class to the forgot buttons anyways...
* The text links load on my test J3 site fine. It might be a conflict with your template styles. Looking at the link code, we have it added as an anchor tag. However, I think it should be updated to a button with btn btn-link class.
* In the meantime, the btn-secondary is hardcoded in the helper.php file around line 94.

2 - Into the Style tab would be better to replace the word "button" with "icon" in all the fields you have right now, like:
Show Password Button CSS Class > Show Password Icon CSS Class OR Show Password Icon FA Class
Are you agree ?

That's fine to me.

4 - By using as “showpasswd” FA icon
- Style tab > Show Password Button CSS Class: far fa-eye
- Style tab > Hide Password Button CSS Class: fas fa-eye-slash
When clicking the password field border is moved to the left, you can test it also on your site. It can be fixed by adding a “width: 1.1rem;”:
…/media/sourcecoast/themes/sclogin/default.css
.sclogin.ns-bs2 .field-icon {
position: relative;
z-index: 2;
font-size: 1rem;
width: 1.1rem;
}
Anyway, the “showpasswd” FA icon, for a really better understanding and viewing, it should be inside the "password" field - I add an image - Are you agree ? Please, Do you have a workaround for it ?

I agree with hardcoding a length to stop the shifting width. J4 hardcodes their width to 1.25em, so our default will probably match theirs. As far as within the password field, our default template style is modeled after the standard Joomla login module. J4 has this as a separate button in the group. It may fit some sites to style it inside, but we'd encourage a theme or template override to do this.

5 - The “forgot” FA icon is not vertically aligned. As far as I see by excluding the “vertical-align: middle;” would solve the issue - Can it be added by default ?

I see the problem on my test site - the button heights were off on size compared to the input boxes. I had to adjust line-heights to fix those buttons and the forgot icon. I see it in your image, but it's hard to determine what would be a good universal fix without seeing the same buttons in action on your page.
Last edit: 2 years 2 months ago by mel.
The topic has been locked.
Active Subscriptions:

None
2 years 2 months ago - 2 years 2 months ago #67846 by joomleb
First of all, really many thanks for your detailed answers! 
Now, considering them, I have to reformulate issues 1 and 4 for a better description / comprehension.


1 - I know that SCLogin can be used without JFBConnect, but JFBConnect includes SCLogin.
Anyway, both should follow the same reasoning. So: 
JFBConnect Configuration > Advanced > Load Bootstrap CSS: None / Bootstrap v2 / Bootstrap v5
 --- with “BS2”: BS2 classes should be used

 --- with “BS5”: BS5 classes should be used
 --- with “None”: BS5 classes should be used (being BS5 the last official version)
(A similar configuration could be added also for SCLogin in the tab “Advanced” as you yet done for FontAwesome CSS)


Bootstrap 2 buttons: getbootstrap.com/2.3.2/base-css.html#buttons
Bootstrap 5 buttons: getbootstrap.com/docs/5.0/components/buttons/
There is no “icon-white” class…


We are speaking about the “Show Forgot Username” and “Show Forgot Password” settings, anyway, if you are considering to apply the same class to the “Show the 'Show Password' button” (I’m not agree, see my following point 4), it should be the one selected through the “Show Forgot Password” setting.
Never should be present by default a “btn-secondary” class. 


And for sure, we are speaking about “buttons”, the “a class …”, not the “i class …” where the “icon-white” is wrongly appended now (see the images).

As not to get confused, I’m going to write here what should be and not what’s happening, and only for Bootstrap 5 (when “None” or “BS5” is selected), “leaving it up to you to decide which classes to add in case BS2 is selected”. So :
SCLogin Module > Login View Settings > (Theme: Default) Show Forgot Username and/or Show Forgot Password:
 --- None - nothing is shown (btn could be by default)
 --- Black button - (btn) btn-secondary
 --- White button - (btn) btn-light
 --- Text link - (btn) btn-link


4 - About the “showpasswd” FA icon that, for a really better understanding and viewing, should be “inside” the "password" field.
You wrote: “...our default template style is modeled after the standard Joomla login module. J4 has this as a separate button in the group…”
Not really, I’m not agree because:
 --- the Username field and Password field, included the show/hide password, have always the same width
 --- the field border radius are applied externally, I mean including the show/hide password
 --- by default in Cassiopea the show/hide password “button” is in a “light” version.
 --- there is only a small gray border between the password field and the show/hide password icon that I’m going to suggest on Joomla github to remove it
I’m going to attach here a Cassiopea image that I prepared for the joomla reporting.
The same is for Atum (awful), that I’m not caring here because being for the Administrator backend it does not consider the “forgot password” / “forgot username” options


5 - The “forgot” FA icon is not vertically aligned.
Keep in note that seems that the BS2 CSS code is applied, while having "JFBConnect Configuration > Advanced > Load Bootstrap CSS: “None”: BS5 classes should be used (being BS5 the last official version)" - ref. my point 1


PPSS - (I'm a "saving spacer" as possible I love a unique layout for desktop / mobile) - Thinking can inspire you on your work, here are my CSS "fixings" for all what I mentioned in this topic:.sclogin-joomla-login.vertical input.sclogin-username.input-block-level, .sclogin-joomla-login.vertical input.sclogin-passwd.input-block-level {
  width: 92% !important; (from my point of view the "!important" is not necessary)
}
.input-append.input-block-level {
  display: inline-flex;
}
span#sc-eye-sclogin-passwd99 {
  margin-left: -2.5rem;
}
a.showpasswd {
  padding: 0.5rem 0;
  border: none;
}
.sclogin.ns-bs2 a.forgot.btn {
  padding: 0.25rem 0.4rem;
}
div#form-sclogin-remember-99 {
  margin-bottom: auto;
}
.sclogin .login img {
margin: 0 0.4rem;
}
.offcanvas-menu .offcanvas-inner .sp-module:not(:last-child) {
  margin-bottom: 0.5rem;
}
Attachments:
Last edit: 2 years 2 months ago by joomleb.
The topic has been locked.
Active Subscriptions:

None
Hi Mel,
when you have some time I would love to hear your comments on my previous post...
The topic has been locked.