-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grading Overview: TS/Tremor -> AG/Blueprint Migration (#2893)
* added filterable columns in grading overview * some cleanup code * moved some grading overview FE components from tremor to blueprint * missing code from previous commit * halfway done for porting tanstack/tremor to ag grid/blueprint * more changes to grading table - animation whilst loading, filter/edit mode, bugfixes * code refactoring * filterable columns, backend sorting shell, and some partial removal of tanstack and tremor table * more component migrations, refactoring and preparation for backend sort * multi -> single sorting, moved over all ts/tremor components to ag/bp, removal of old code * fix table cutoff on small horizontal resolution and missing hover effects * refresh button for table * fixed richard's comments (mostly), and added a fix for josh's comment and PR * fixed edge case of attempted/submitted on filter from prev commit * mock files, change josh's pr 2nd issue to remove non-submitted filters on selecting ungraded, some refactoring * fixed wrong username and text overflow * eslint * prettier checks * backend mock changes * minor adjustments and cleanups * minor ui adjustments for better mobile compatability * preparation for P2 merge * eslint prettier * compile erros * compile error and eslint * prettier checks * minor ui adjustments * Revert change back to raw strings * typescript v5 fixes and richard's comments * more typescript v5 fixes * prettier * some refactoring and bug fixing * null value error in empty cell & wider actions col * added submitted to unpublished allowed filters * Fix format * Fix compile error post-merge * Refactor GradingFlex * Add React import * Remove unnecessary type annotations * Extract default styles outside component * Remove unused props * Refactor GradingText * Add React import * Use `classnames` utility * Use `Classes` object instead of raw string CSS API * Move constant default styles out of component * Remove unused props * Update BackendSaga.ts * Use strict inequality * Use `Object.entries` to iterate over both key and value * Refactor GradingFilterable.tsx * Refactor GradingActions * Add React import * Use `useSession` over `useTypedSelector` * Use Blueprint's `Tooltip` component over `htmlTitle` * Remove unnecessary `={true}` in props * Simplify conditionals with `&&` * Simplify conditions in conditionals For better readability. * Refactor conditions For readability. * Refactor GradingColumnCustomHeaders.tsx * Add React import * Use `classNames` utility instead of `String` * Remove unused prop export * Convert Props interface to type * Remove unnecessary type annotations and arguments * Convert conditional to `&&` * Refactor GradingColumnFilters.tsx * Add React import * Refactor GradingBadges.tsx * Add React import * Improve typing of badge colors * Use optional chaining where possible * Remove unused export * Add missing React import Also renamed a type to `Props` as it is unexported. * Fix imports and format post merge * hw review changes and child key error fix * fixed randomly broken grading table headers and merge conflicts * prettier * Reformat post-lint updates * Add TODO * Remove unused CSS class * Scope most styles to CSS modules * Migrate more styles to CSS modules * Simplify to use new actions format * Migrate more classes to CSS modules * Refactor grading badge styles to separate module file * Remove hardcoded CSS namespace * Make fix less hacky * Remove unnecessary default with enum type * Refactor column builder to separate file Use dependency injection to avoid needing a hook. * Remove unnecessary space * Improve readability * Remove unused param * Remove unnecessary `={true}` * Add TODO * Refactor grading badge * Simplify props * Remove unneded export --------- Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
- Loading branch information
1 parent
72ea6de
commit cfc32e9
Showing
27 changed files
with
1,607 additions
and
465 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Property } from 'csstype'; | ||
import React from 'react'; | ||
|
||
const defaultStyles: React.CSSProperties = { | ||
display: 'flex' | ||
}; | ||
|
||
type Props = { | ||
justifyContent?: Property.JustifyContent; | ||
alignItems?: Property.AlignItems; | ||
flexDirection?: Property.FlexDirection; | ||
children?: React.ReactNode; | ||
style?: React.CSSProperties; | ||
className?: string; | ||
}; | ||
|
||
const GradingFlex: React.FC<Props> = ({ | ||
justifyContent, | ||
alignItems, | ||
flexDirection, | ||
children, | ||
style, | ||
className | ||
}) => { | ||
const styles: React.CSSProperties = { ...style, justifyContent, alignItems, flexDirection }; | ||
return ( | ||
<div className={className} style={{ ...defaultStyles, ...styles }}> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
export default GradingFlex; |
This file contains 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Classes, Text } from '@blueprintjs/core'; | ||
import classNames from 'classnames'; | ||
import React from 'react'; | ||
|
||
const defaultStyles: React.CSSProperties = { | ||
width: 'max-content', | ||
margin: 'auto 0' | ||
}; | ||
|
||
type Props = { | ||
children?: React.ReactNode; | ||
style?: React.CSSProperties; | ||
isSecondaryText?: boolean; | ||
className?: string; | ||
}; | ||
|
||
const GradingText: React.FC<Props> = ({ children, style, isSecondaryText, className }) => { | ||
return ( | ||
<Text | ||
className={classNames(Classes.UI_TEXT, className, isSecondaryText && Classes.TEXT_MUTED)} | ||
style={{ ...defaultStyles, ...style }} | ||
> | ||
{children} | ||
</Text> | ||
); | ||
}; | ||
|
||
export default GradingText; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.