Skip to content

Varkopat/feature/658/implement new teachersignincard component - #663

Merged
Skoivumaki merged 15 commits into
devfrom
Varkopat/feature/658-implement-new-teachersignincard-component
Jul 24, 2026
Merged

Varkopat/feature/658/implement new teachersignincard component#663
Skoivumaki merged 15 commits into
devfrom
Varkopat/feature/658-implement-new-teachersignincard-component

Conversation

@Varkopat

@Varkopat Varkopat commented Jun 29, 2026

Copy link
Copy Markdown

📄 Pull Request Overview

Closes #658

🔧 Changes Made

  1. [Briefly describe changes you made]

Implemented and polished the teacher sign-in card UI.

Key changes:

  • Added username and password visibility toggles with eye icons.
  • Updated the ALT logo and teacher character sizing/positioning to match the provided Figma/screenshot specs.
  • Adjusted .Container and .Card layout to center the card properly.
  • Center-aligned the username input, password input, and submit button while preserving Figma dimensions.
  • Refined .SubmitButton styling, spacing, sizing, border, and text alignment.
  • Verified the touched component with npm.cmd run lint -- --file src/features/TeacherSignIn/ui/TeacherSignInCard/TeacherSignInCard.tsx.
  1. [Any refactoring or clean-up tasks]

A few clean-up notes:

  • Reused one local VisibilityIcon component for both username and password toggles instead of duplicating inline SVGs.
  • Removed conflicting/off-screen positioning values from the card-related styles.
  • Replaced invalid or awkward layout values, such as nonfunctional absolute offsets.
  • Added box-sizing: border-box to preserve Figma dimensions while keeping padding from shifting inputs.
  • Kept the changes scoped to TeacherSignInCard styles and markup.

Checklist Before Submission

  • Functionality: I have tested my code, and it works as expected.
  • JSDoc: I have added or updated JSDoc comments for all relevant code.
  • Debugging: No console.log() or other debugging statements are left.
  • Clean Code: Removed commented-out or unnecessary code.
  • Tests: Added new tests or updated existing ones for the changes made.
  • Documentation: Documentation has been updated (if applicable).

📝 Additional Information

Provide any additional context or information that reviewers may need to know:

  • Screenshots: [Include any screenshots or videos if the changes affect the UI]
screenshot

Varkopat added 10 commits June 4, 2026 17:40
- Created TeacherSignInCard component for teacher sign-in functionality.
- Added styles for the TeacherSignInCard in TeacherSignInCard.module.scss.
- Implemented visibility toggle for username and password fields.
- Integrated ALT logo and teacher character images.
- Set up routing to navigate to the instructions page upon form submission.

TODO: Adjust UI to match Figma Designs.
…siveness.

I centered the input/button rail while keeping the Figma dimensions:
.Form is now centered inside .Card.
.UsernameInput and .PasswordInput keep 438.51px x 54.54px, but now use box-sizing: border-box so padding does not push them off-center.
Input wrappers and form groups center their children.
.SubmitButton keeps its Figma size and is centered with flex alignment.
Verification passed without ESLint warnings or errors: npm.cmd run lint -- --file src/features/TeacherSignIn/ui/TeacherSignInCard/TeacherSignInCard.tsx

@Rutjake Rutjake left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great job overall! Just a few minor tweaks to match the Figma design (please also check the specific comments left on the code lines):

  • Card borders: The card corners should be slightly rounded.
  • Button: The button needs more rounded ends (higher border-radius).
  • Login card size: The login card seems a bit smaller relative to the screen size in Figma compared to the current implementation.

Varkopat added 5 commits July 8, 2026 19:02
- Changed media queries to use the breakpoint mixins defined in the _mixins.scss file to keep the media queries consistent.
- Added border-radius to SubmitButton
…roved layout

Changes made:
- Rounded the card corners
- Made the login card a bit smaller so it better matches the Figma design
@Varkopat

Copy link
Copy Markdown
Author

Great job overall! Just a few minor tweaks to match the Figma design (please also check the specific comments left on the code lines):

  • Card borders: The card corners should be slightly rounded.
  • Button: The button needs more rounded ends (higher border-radius).
  • Login card size: The login card seems a bit smaller relative to the screen size in Figma compared to the current implementation.

Thanks for your feedback! I made the requested changes in my latest pushes. Here is a screenshot of current UI:

screenshot

@Varkopat
Varkopat requested a review from Rutjake July 14, 2026 18:17

@Rutjake Rutjake left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good Work!

@Skoivumaki Skoivumaki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good use of existing components and variables, everything works and looks as expected. Your code looks very professional and you have clearly been reading the wiki👍
Some feedback:

  • I noticed you declared some CSS px values in decimals. Precision like this is notable, but doesn't make much sense since most browsers will round it to the nearest value. (you cant split a pixel, 1px is always 1px etc)
  • If you want even cleaner code, you can move SVG code into an actual .svg, its just XML text in the end.
  • Usually we fetch translations useClientTranslation('teachers'); only in the top parent page.tsx layer and not in components them self. This is due to code readability and it negates potential errors. But the TeacherSignInCard is the only component which requires translations anyway, so its completely acceptable in this case.

@Skoivumaki
Skoivumaki merged commit 5544108 into dev Jul 24, 2026
3 checks passed
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.

3 participants