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

Hide Columns #624

Merged
merged 28 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0144c47
Initial functionality for column hiding
KevinWu098 Jun 13, 2023
8c98b36
Added functionality to SectionTable (the header row)
KevinWu098 Jun 13, 2023
7dcf057
Minor styling fix to the colunSelector Select element
KevinWu098 Jun 13, 2023
a6dcbe6
Spring Cleaning for some code quality 😋, abstractedaway a few things,…
KevinWu098 Jun 13, 2023
7897fae
Removed redundant code
KevinWu098 Jun 30, 2023
eb6eb87
Removed unused code
KevinWu098 Jun 30, 2023
7ceccdb
Removed redundant code a la SectionTable
KevinWu098 Jun 30, 2023
bd3b142
Changed object array naming for parity with SectionTable & CoursePane…
KevinWu098 Jun 30, 2023
f1ddcbd
Merge branch 'main' into columnFilter
KevinWu098 Jun 30, 2023
449fc61
Cleaned up RightPaneStore as part of resolving merge conflicts
KevinWu098 Jun 30, 2023
260a8b2
Extracted ColumnFilter component
KevinWu098 Jun 30, 2023
6e274de
Column filter refactor (#653)
ap0nia Aug 15, 2023
ee805fa
refactor: provide context for empty select value
ap0nia Aug 15, 2023
3e9d947
refactor: remove extraneous react imports
ap0nia Aug 15, 2023
1f2b0b6
refactor: specify type only import
ap0nia Aug 15, 2023
ade680e
refactor: clean up
ap0nia Aug 15, 2023
f28076d
Merge branch 'main' into columnFilter
KevinWu098 Aug 19, 2023
bd4b014
Fix bad merge
KevinWu098 Aug 20, 2023
af5c96a
fix: un-idiomatic react code
ap0nia Aug 20, 2023
00c6e96
style: cleaned up newline spacing
ap0nia Aug 20, 2023
5a5509c
style: === 0
ap0nia Aug 20, 2023
0da3ee8
fix: important typo
ap0nia Aug 20, 2023
61f6f76
refactor: removed extraneous dependencies
ap0nia Aug 20, 2023
63bd530
fix: wrong boolean conditional
ap0nia Aug 20, 2023
d795600
refactor: extracted day parser
ap0nia Aug 21, 2023
ad3f0f1
Merge branch 'main' into columnFilter
ap0nia Aug 21, 2023
7dcb699
Correct merge by renaming highlightAdded to allowHighlight
KevinWu098 Aug 21, 2023
24966fb
Remove colorAndDelete prop
KevinWu098 Aug 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 18 additions & 29 deletions apps/antalmanac/src/components/AppBar/CustomAppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ClassNameMap } from '@material-ui/core/styles/withStyles';
import MenuIcon from '@material-ui/icons/Menu';
import React, { MouseEventHandler } from 'react';

import ConditionalWrapper from '../ConditionalWrapper';
import AboutPage from './AboutPage';
import Feedback from './Feedback';
import ImportStudyList from './ImportStudyList';
Expand Down Expand Up @@ -38,6 +37,14 @@ interface CustomAppBarProps {
classes: ClassNameMap;
}

const components = [
<SettingsMenu key="settings" />,
<ImportStudyList key="studylist" />,
<Feedback key="feedback" />,
<News key="news" />,
<AboutPage key="about" />,
];
KevinWu098 marked this conversation as resolved.
Show resolved Hide resolved

const CustomAppBar = ({ classes }: CustomAppBarProps) => {
const isMobileScreen = useMediaQuery('(max-width:750px)');

Expand All @@ -60,36 +67,18 @@ const CustomAppBar = ({ classes }: CustomAppBarProps) => {

<LoadSaveScheduleFunctionality />

<ConditionalWrapper
condition={isMobileScreen}
wrapper={(children) => (
<div>
<MenuIcon onClick={handleClick} />
<Menu anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>
{children}
</Menu>
</div>
)}
>
{isMobileScreen ? (
KevinWu098 marked this conversation as resolved.
Show resolved Hide resolved
<>
{[
// the keys here don't do anything they just make eslint happy.
<SettingsMenu key="settings" />,
<ImportStudyList key="studylist" />,
<Feedback key="feedback" />,
<News key="news" />,
<AboutPage key="about" />,
].map((element, index) => (
<ConditionalWrapper
key={index}
condition={isMobileScreen}
wrapper={(children) => <MenuItem>{children}</MenuItem>}
>
{element}
</ConditionalWrapper>
))}
<MenuIcon onClick={handleClick} />
<Menu anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>
{components.map((element, index) => (
<MenuItem key={index}>{element}</MenuItem>
))}
</Menu>
</>
</ConditionalWrapper>
) : (
components
)}
</Toolbar>
</AppBar>
);
Expand Down
54 changes: 25 additions & 29 deletions apps/antalmanac/src/components/Calendar/CalendarToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { ClassNameMap, Styles } from '@material-ui/core/styles/withStyles';
import { Delete, MoreHoriz, Undo } from '@material-ui/icons';
import React, { useState } from 'react';

import ConditionalWrapper from '../ConditionalWrapper';
import CustomEventDialog from './Toolbar/CustomEventDialog/CustomEventDialog';
import EditSchedule from './Toolbar/EditSchedule/EditSchedule';
import ScheduleNameDialog from './Toolbar/EditSchedule/ScheduleNameDialog';
Expand Down Expand Up @@ -162,36 +161,33 @@ const CalendarPaneToolbar = ({
</IconButton>
</Tooltip>

<ConditionalWrapper
condition={isMobileScreen}
wrapper={(children) => (
<div>
<IconButton onClick={handleMenuClick}>
<MoreHoriz />
</IconButton>

<Menu anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleMenuClose}>
{children}
</Menu>
</div>
)}
>
{isMobileScreen ? (
<div>
<IconButton onClick={handleMenuClick}>
<MoreHoriz />
</IconButton>

<Menu anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleMenuClose}>
<MenuItem onClick={handleMenuClose}>
<ExportCalendar />
</MenuItem>

<MenuItem onClick={handleMenuClose}>
<ScreenshotButton onTakeScreenshot={onTakeScreenshot} />
</MenuItem>

<MenuItem onClick={handleMenuClose}>
<CustomEventDialog scheduleNames={scheduleNames} />
</MenuItem>
</Menu>
</div>
) : (
<>
{[
<ExportCalendar key="export" />,
<ScreenshotButton onTakeScreenshot={onTakeScreenshot} key="screenshot" />,
<CustomEventDialog scheduleNames={scheduleNames} key="custom" />,
].map((element, index) => (
<ConditionalWrapper
key={index}
condition={isMobileScreen}
wrapper={(children) => <MenuItem onClick={handleMenuClose}>{children}</MenuItem>}
>
{element}
</ConditionalWrapper>
))}
<ExportCalendar key="export" />
<ScreenshotButton onTakeScreenshot={onTakeScreenshot} key="screenshot" />
<CustomEventDialog scheduleNames={scheduleNames} key="custom" />
</>
</ConditionalWrapper>
)}
</Paper>
);
};
Expand Down
22 changes: 0 additions & 22 deletions apps/antalmanac/src/components/ConditionalWrapper.tsx
KevinWu098 marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

44 changes: 21 additions & 23 deletions apps/antalmanac/src/components/PatchNotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,27 @@ const PatchNotes = () => {
>
<DialogTitle>{"What's New - May 2023"}</DialogTitle>
<DialogContent>
<DialogContentText>
KevinWu098 marked this conversation as resolved.
Show resolved Hide resolved
Features
<ul>
<li>
Added a prerequisite tree display to all courses. It shows the prerequisites for a
course and what courses require it.
</li>
</ul>
<img
src="https://github-production-user-asset-6210df.s3.amazonaws.com/48658337/240030108-62b94332-ff64-4b7b-a3a8-12d58c771d8d.gif"
alt="Click on the white course info button to see the prereq tree"
style={{
maxWidth: '100%',
boxShadow: '4px 4px 4px rgba(0, 0, 0, 0.4)',
}}
></img>
<br />
Remember to use the{' '}
<a href="https://docs.google.com/forms/d/e/1FAIpQLSe0emRHqog-Ctl8tjZfJvewY_CSGXys8ykBkFBy1EEUUUHbUw/viewform">
feedback form
</a>{' '}
to let us know what you think!
</DialogContentText>
Features
<ul>
<li>
Added a prerequisite tree display to all courses. It shows the prerequisites for a course
and what courses require it.
</li>
</ul>
<img
src="https://github-production-user-asset-6210df.s3.amazonaws.com/48658337/240030108-62b94332-ff64-4b7b-a3a8-12d58c771d8d.gif"
alt="Click on the white course info button to see the prereq tree"
style={{
maxWidth: '100%',
boxShadow: '4px 4px 4px rgba(0, 0, 0, 0.4)',
}}
></img>
<br />
Remember to use the{' '}
<a href="https://docs.google.com/forms/d/e/1FAIpQLSe0emRHqog-Ctl8tjZfJvewY_CSGXys8ykBkFBy1EEUUUHbUw/viewform">
feedback form
</a>{' '}
to let us know what you think!
</DialogContent>
<DialogActions>
<Button
Expand Down
Loading