-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Upgrade Ant to version 5 #166
Conversation
…ncluded in package-lock.json
<Descriptions column={1} size="small" colon={false}> | ||
{userData.totalCells && <Descriptions.Item label="Number of Cells:"> |
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.
Makes colons part of the label to prevent a weird alignment bug with multiline labels
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.
Running locally looks good and all the changes look sensible.
To be fair its a lot of code and its very similar to the code its replacing, which I think makes it easy to miss things in review, but I didn't catch anything. Tried to interact with all the pieces in the UI.
Nice job with the refactor!
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 looks like a lot of work and is overall a massive improvement - thank you for doing it! Realizing looking back that I left a lot of comments... but that's only down to the size of this PR. They're mostly minor polish, and none are blocking.
src/components/GalleryCard/index.tsx
Outdated
<Button icon="download" /> | ||
<Tooltip key={`${props.cellID}-download`} title={hasDownload ? null : NO_DOWNLOADS_TOOLTIP}> | ||
<Dropdown menu={{ items: menuItems }} trigger={["click"]}> | ||
<Button className={hasDownload ? "" : styles.disabled}> |
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.
just curious: was this disabled
behavior just not working before, or is this a class that antd 3 used to apply that our code now applies itself?
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.
Disabled styling doesn't seem to have worked very well before. I ended up removing the disabled behavior from the 3D view button, and fixing the Dropdown to work correctly as a disabled component.
const MouseFollower = React.forwardRef<HTMLDivElement, React.PropsWithChildren<MouseFollowerProps>>( | ||
(props, ref) => { |
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.
Neat!
Co-authored-by: Cameron Fraser <53030214+frasercl@users.noreply.github.com>
- Updates web-3d-viewer to version 2.9.0. - Updates the API for the web-3d-viewer. - Fixes some broken styling caused by Ant version mismatch. (Will be removed in #166.) Full changes: * fix: Changed props for ImageViewerApp to match new w3cv API * refactor: Upgrade web-3d-viewer to 2.9.0 * fix: Fix styling on channel settings tab due to ant version or font * fix: Fixed missing ant drawer * fix: Icons in toolbar were off-center * fix: Missing type declaration in tests * test: Update CI action to node v20 * test: Import type declarations * test: Use original type declaration import, change CI action ordering * fix: Fixed build issues caused by local w3cv project instance being included in package-lock.json
- Removes old Less styling rules and replaces it with Ant's new `ConfigProvider` model. - Fixed an existing bug where, on narrow screens, parts of the Gallery could not be interacted with. - Fixed an existing bug where a gap would appear next to the main plot view. - Fixes a list of roughly 50 UI-related issues, as noted in #165. Full changes: * fix: Changed props for ImageViewerApp to match new w3cv API * refactor: Upgrade web-3d-viewer to 2.9.0 * fix: Fix styling on channel settings tab due to ant version or font * fix: Fixed missing ant drawer * fix: Icons in toolbar were off-center * fix: Missing type declaration in tests * test: Update CI action to node v20 * test: Import type declarations * test: Use original type declaration import, change CI action ordering * fix: Fixed build issues caused by local w3cv project instance being included in package-lock.json * refactor: Upgrade to Ant ^5.16.2, fix compile issues * fix: Removed unsupported babel plugin * fix: Text colors, title colors, header font weight * fix: Page background color, link color * fix: Header alignment * fix: Button colors and shadows, landing page text size * fix: Title color, paragraph padding, table margins * fix: Bad colon alignment on dataset descriptions * fix: Layout issues on viewer page * fix: Loading spinner color * fix: Header colors, alignment * feat: Increased tab icon sizes, alignment fixes * refactor: Make palette colors a constant * fix: Fixed overlap of viewer title and menu tab buttons * fix: Header menu tab styling * fix: Incorrect font in cookie banner * fix: Sider background colors * fix: Card action formatting * fix: Gallery background width, transparency * fix: Button and icon styling on gallery sidebar * fix: Action list on button icons * fix: Menu header being the incorrect height * fix: Album list hover and selection colors * fix: Removed extra margin at bottom of page caused by gallery sider * fix: Unclickable gallery close button, searchbar overlapping scrollbar * fix: Removed deprecated properties on menus, modals, and dropdowns * fix: Checkbox colors * fix: Fixed 3d viewer and plot extending into gallery sider * fix: Close button on selected set * fix: Album text alignment * fix: Popconfirm background color, removed button shadows * fix: Axis dropdown not changing on selection, showing keys instead of names on dropdown * feat: Adjusted selected set delete button style * fix: Style matching on thumbnail popover * fix: Popover now follows mouse * refactor: Deleted unused style CSS * feat: Adjusted margin on gallery buttons * fix: Gallery card button spacing, fixed download dropdown * fix: Dropdowns extending up into header and being unclickable * fix: Temporarily fixed dropdowns by overriding width * fix: Linting * refactor: Restored .gitkeep * refactor: Import sorting, renamed variables * refactor: Palette now has base colors to prevent reused strings * refactor: Code cleanup, increased tab icon size * fix: Alignment of 3d viewer text, increased plot height * fix: Dropdown arrow color, dropdown width * fix: Alignment on gallery header * refactor: Removed style overrides for CellViewer * refactor: Removed unused less dependencies * refactor: Removed additional unused dependencies * refactor: Sorted imports, moved CSS * refactor: Moved imports, prevented theme re-calculation * refactor: Use single JSX tag instead of opening + closing tags Co-authored-by: Cameron Fraser <53030214+frasercl@users.noreply.github.com> * refactor: More import sorting, removed unused CSS * fix: Disabled button styling in Gallery view * fix: Linting --------- Co-authored-by: Cameron Fraser <53030214+frasercl@users.noreply.github.com> refactor: Upgrade web-3d-viewer to 2.9.0 fix: Fix styling on channel settings tab due to ant version or font fix: Icons in toolbar were off-center fix: Missing type declaration in tests test: Update CI action to node v20 test: Import type declarations test: Use original type declaration import, change CI action ordering fix: Fixed build issues caused by local w3cv project instance being included in package-lock.json
Problem
Closes #165, upgrading Ant Design to version 5. This is a required dependency of website-3d-volume-viewer as of version 2.9.0, and unblocks #164.
Estimated size: large, ~50-60 minutes, but it's all CSS. Turning off whitespace changes is recommended.
Solution
ConfigProvider
model.Type of change
Steps to Verify:
Screenshots (optional):
Keyfiles (delete if not relevant):
Thanks for contributing!