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

Add semester auto select to interest page #5165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Bestem0r
Copy link
Contributor

@Bestem0r Bestem0r commented Nov 6, 2024

Description

Makes the selected semester under company interest the current semester by default.

Result

  • Changes look good on both light and dark theme.
  • Changes look good with different viewports (mobile, tablet, etc.).
  • Changes look good with slower Internet connections.
Screencast.From.2024-11-06.21-14-27.mp4

Testing

  • I have thoroughly tested my changes.

Resolves ABA-1048

Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
lego-bricks-storybook ⬜️ Ignored (Inspect) Visit Preview Nov 7, 2024 0:46am

@github-actions github-actions bot added the review-needed Pull requests that need review label Nov 6, 2024
Copy link
Member

@ivarnakken ivarnakken left a comment

Choose a reason for hiding this comment

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

Looks mostly good! 😄 Nicely done

Comment on lines 244 to 245
value: Number(currentCompanySemester?.id) ?? 9999,
year: currentCompanySemester?.year ?? 9999,
Copy link
Member

Choose a reason for hiding this comment

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

💀 why not just the current year?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If currentCompanySemester is undefined (which it really shouldn't since the default option is the current semester), the input should default to "Vis alle semestre". Looking at the old implementation, the value defaulted to '', but year is now a number. Would Number(currentCompanySemester?.year) be better?

Comment on lines +83 to +84
T,
Option extends { label: string; value: T },
Copy link
Member

Choose a reason for hiding this comment

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

is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's maybe not the best solution, but it fixes typescript errors when value is not a number (the most common case afaik). I assume value: any would not be better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-needed Pull requests that need review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants