-
Notifications
You must be signed in to change notification settings - Fork 93
About box #1377
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
base: main
Are you sure you want to change the base?
Conversation
Choollol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions, mostly small things that you may or may not want to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe suffix the file names with "Button" to make it clearer what this component is during development. Same with the other components in this folder.
I'm not sure exactly what the conventions are in this project though, so if this is standard let me know!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also consider suffixing the relevant components with "LinkButton" to make it really clear what they do.
| import { AboutBox } from '$components/RightPane/CoursePane/SearchForm/AboutBox'; | ||
| import FuzzySearch from '$components/RightPane/CoursePane/SearchForm/FuzzySearch'; | ||
| import { HelpBox } from '$components/RightPane/CoursePane/SearchForm/HelpBox'; | ||
| // import { HelpBox } from '$components/RightPane/CoursePane/SearchForm/HelpBox'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure exactly what conventions are, but maybe delete any commented-out code. Same for the other commented part in this file.
| setLocalStorageAboutBoxCollapseTime(Date.now().toString()); | ||
| }, []); | ||
|
|
||
| const handleClick = useCallback(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Move toggleExpandAboutBox(); to the top of the function to make it more readable
|
|
||
| import { PROJECTS_LINK } from '$src/globals'; | ||
|
|
||
| export const ICSSCIcon = (props: SvgIconProps) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move into separate file maybe, it's used only here for now so not too big.
| return getLocalStoragePatchNotesKey() !== LATEST_PATCH_NOTES_UPDATE && !tourShouldRun(); | ||
| } | ||
|
|
||
| function dismissedRecently(dismissalTime: string | null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function's body is used in a couple other places too, we should probably create a shared utility for calculating this. Also maybe add some info about the time unit in the variable name, maybe dismissalTimeDays or create an options object.
If that should be done separately from this PR, I can make an issue and take it on.
| import { useHelpMenuStore } from '$stores/HelpMenuStore'; | ||
| import { useThemeStore } from '$stores/SettingsStore'; | ||
|
|
||
| const images = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Could add some type safety to these, something like this:
interface ImageInfo {
src: string;
title: string;
alt: string;
}
const images: ImageInfo[] = ...| expanded={expandAboutBox} | ||
| onChange={handleClick} | ||
| sx={{ | ||
| padding: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This padding is causing the elements to shift the tiniest amount after the accordion opens. It's barely noticeable, but wanted to let you know in case it's a problem.
Summary
About antalmanac scheduler
https://discord.com/channels/772739905981644850/1320360830251827272/1445938264925016205
Collapsible about box that replaces the help box in the right pane.
Test Plan
Issues
Closes #1386 partially