-
Notifications
You must be signed in to change notification settings - Fork 9
Undo/Clear Timetable Buttons: Move Position to Make Room for Dropdown UI (#1074) #1077
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
Open
yumnazaheed
wants to merge
6
commits into
dev
Choose a base branch
from
timetable-buttons
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a58e4b6
modified course search tab width
43a80ee
aligned undo, redo, delete buttons with mytimetable
92e3094
reduced spacing between drop-down buttons
4f13293
Apply suggestions from code review
yumnazaheed 02f8e0b
improve tab and history button spacing
0574862
reduced space between timetable tabs and history buttons
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,34 @@ | ||
| import { Box, Grid } from '@mui/material'; | ||
| import { Box } from '@mui/material'; | ||
| import { styled } from '@mui/system'; | ||
| import React from 'react'; | ||
|
|
||
| import { ControlsProps } from '../../interfaces/PropTypes'; | ||
| import Autotimetabler from './Autotimetabler'; | ||
| import CourseSelect from './CourseSelect'; | ||
| import CustomEvents from './CustomEvent'; | ||
| import History from './History'; | ||
| import TermSelect from './TermSelect'; | ||
| const ControlsBar = styled(Box)` | ||
| display: flex; | ||
| align-items: flex-end; // Align all controls to the bottom | ||
| padding-left: 66px; | ||
| gap: 12px; | ||
| `; | ||
|
|
||
| const TermSelectWrapper = styled(Box)` | ||
| flex: 0 0 auto; | ||
| margin-top: 20px; | ||
| margin-right: 10px; | ||
| min-width: 140px; | ||
| display: flex; | ||
| align-items: flex-start; | ||
| margin-bottom: 0; // Remove any margin that could misalign | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here 🪓 |
||
| `; | ||
|
|
||
| const SelectWrapper = styled(Box)` | ||
| display: flex; | ||
| flex-direction: row; | ||
| grid-column: 1 / -1; | ||
| grid-row: 1; | ||
| padding-top: 20px; | ||
| flex-grow: 1; | ||
| flex-shrink: 1; | ||
| flex-basis: 0; | ||
| flex-grow: 2; | ||
| min-width: 600px; // Wider search bar | ||
| margin-bottom: 0; | ||
| `; | ||
|
|
||
| const AutotimetablerWrapper = styled(Box)` | ||
| flex: 1; | ||
|
|
||
| ${({ theme }) => theme.breakpoints.down('sm')} { | ||
| flex: none; | ||
| } | ||
| `; | ||
|
|
||
| const CustomEventsWrapper = styled(Box)` | ||
| flex: 1; | ||
| `; | ||
|
|
||
| const HistoryWrapper = styled(Box)` | ||
| margin-top: 20px; | ||
| margin-left: 3px; | ||
| const ButtonRow = styled(Box)` | ||
| display: flex; | ||
| gap: 8px; // Reduced gap between buttons | ||
| margin-bottom: 0; | ||
| `; | ||
|
|
||
| const Controls: React.FC<ControlsProps> = ({ | ||
|
|
@@ -53,33 +38,23 @@ const Controls: React.FC<ControlsProps> = ({ | |
| handleRemoveCourse, | ||
| }) => { | ||
| return ( | ||
| <Grid container sx={{ paddingLeft: '66px' }} spacing={2}> | ||
| <Grid item container xs={12} md={6.5} direction="row"> | ||
| <TermSelectWrapper> | ||
| <TermSelect /> | ||
| </TermSelectWrapper> | ||
|
|
||
| <SelectWrapper minWidth={'296px'}> | ||
| <CourseSelect | ||
| assignedColors={assignedColors} | ||
| handleSelect={handleSelectCourse} | ||
| handleRemove={handleRemoveCourse} | ||
| /> | ||
| </SelectWrapper> | ||
| </Grid> | ||
| <Grid item container direction="row" alignItems="center" justifyContent="space-between" xs={12} md={5.5}> | ||
| <CustomEventsWrapper> | ||
| <CustomEvents /> | ||
| </CustomEventsWrapper> | ||
| <AutotimetablerWrapper> | ||
| <Autotimetabler handleSelectClass={handleSelectClass} /> | ||
| </AutotimetablerWrapper> | ||
| <HistoryWrapper> | ||
| <History /> | ||
| </HistoryWrapper> | ||
| </Grid> | ||
| </Grid> | ||
| <ControlsBar> | ||
| <TermSelectWrapper> | ||
| <TermSelect /> | ||
| </TermSelectWrapper> | ||
| <SelectWrapper> | ||
| <CourseSelect | ||
| assignedColors={assignedColors} | ||
| handleSelect={handleSelectCourse} | ||
| handleRemove={handleRemoveCourse} | ||
| /> | ||
| </SelectWrapper> | ||
| <ButtonRow> | ||
| <CustomEvents /> | ||
| <Autotimetabler handleSelectClass={handleSelectClass} /> | ||
| </ButtonRow> | ||
| </ControlsBar> | ||
| ); | ||
| }; | ||
|
|
||
| export default Controls; | ||
| export default Controls; | ||
|
yumnazaheed marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
remove comment 🪓