Skip to content
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

UI for Multiple Classrooms #526

Merged
merged 29 commits into from
Sep 12, 2024
Merged

UI for Multiple Classrooms #526

merged 29 commits into from
Sep 12, 2024

Conversation

igawaclawska
Copy link
Contributor

@igawaclawska igawaclawska commented Sep 11, 2024

works together with the branch: 198-students-invisible-when-joining-second-classroom (zeeguu/api#206) in the API repo

UI for multiple classrooms

Desktop view (animated):

Adding Classroom Removing Classroom Error Message
adding-ezgif com-video-to-gif-converter removing-ezgif com-video-to-gif-converter error-ezgif com-video-to-gif-converter

Mobile View (not animated):

localhost_3000_account_settings_current_class(iPhone 12 Pro)

Implementation

- New components are introduced:

  • FullWidthListItem.js
  • FullWidthListContainer.js

- Changes to the error message:

  • Now, the error message is cleared after a successful next attempt

- Modal is introduced:

  • To prevent users leaving a classroom by accident

Other

  • the Classrooms.js page and its associated modal LeaveClassroomModal has been grouped together and placed n the Classrooms folder
  • the FullWidthErrorMsg component has been moved to the components folder

Future improvements

  • refactor of grey colors
  • merge the modal and preference page buttons into one
  • as agreed with @mircealungu, some simple components, such as this one
import * as s from "./TagContainer.sc";

export default function TagContainer({ children }) {
  return <s.TagContainer>{children}</s.TagContainer>;
}

can exist as separate, individual, importable styled-components instead, without their associated react function - I will gradually take care of this change

Copy link

netlify bot commented Sep 11, 2024

Deploy Preview for voluble-nougat-015dd1 ready!

Name Link
🔨 Latest commit 03fc33e
🔍 Latest deploy log https://app.netlify.com/sites/voluble-nougat-015dd1/deploys/66e2bfc6f321bb000843edba
😎 Deploy Preview https://deploy-preview-526--voluble-nougat-015dd1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@tfnribeiro tfnribeiro left a comment

Choose a reason for hiding this comment

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

Looks good to me - tested in my local environment and behaved as expected. I will just make a commit to remove a console.log from the API call. This was used for testing.

<Header>
<Heading>
You are about to leave the following classroom:{" "}
<s.ColorAccent>{currentClassroom.name}</s.ColorAccent>
Copy link
Contributor

Choose a reason for hiding this comment

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

While I think blue is a nice contrast colour - my first intuition was that I could click it as a link. This might just be me and Blue = Link association, but just a not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good observation! I'll change it

Copy link
Contributor Author

@igawaclawska igawaclawska Sep 11, 2024

Choose a reason for hiding this comment

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

For now, I've decided to go with dark orange (gold) as the brighter one is challenging to read (not enough contrast).
I think in the future we could consider adding more shades in between these colors (similarly as with blue) for improved variety and contrast in some instances (e.g. buttons).

Orange (discarded) Dark orange (selected)
Screenshot 2024-09-11 at 10 41 37 Screenshot 2024-09-11 at 10 41 14

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with the bolder option!

setStudentJoinedCohort(student.cohort_id !== null),
); // eslint-disable-next-line
api.getStudent((student) => {
console.log(student);
Copy link
Contributor

Choose a reason for hiding this comment

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

This console.log might have been me, but we should remove it.

@mircealungu mircealungu self-requested a review September 12, 2024 10:17
Copy link
Member

@mircealungu mircealungu left a comment

Choose a reason for hiding this comment

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

great work!

@mircealungu mircealungu merged commit b103cb6 into master Sep 12, 2024
3 of 4 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