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

Migrate new UI to Chakra v3 #43523

Merged
merged 4 commits into from
Nov 1, 2024
Merged

Conversation

bbovenzi
Copy link
Contributor

@bbovenzi bbovenzi commented Oct 30, 2024

Chakra v3 came out last week. Its a really big change. So its better than we migrate sooner rather than later. By the time Airflow 3 comes out it won't be at 3.0.0 anymore.

Closes: #43483

Screenshot 2024-10-31 at 10 13 00 AM Screenshot 2024-10-31 at 10 13 07 AM Screenshot 2024-10-31 at 10 12 42 AM Screenshot 2024-10-31 at 10 12 55 AM

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Oct 30, 2024
@bbovenzi bbovenzi force-pushed the migrate-to-chakra-v3 branch from 9073063 to 5172259 Compare October 30, 2024 19:32
@bbovenzi bbovenzi marked this pull request as ready for review October 31, 2024 14:12
Fix react-select and tests

Rename alert.tsx to Alert.tsx

Rename menu.tsx to Menu.tsx

Rename tag.tsx to Tag.tsx

Rename tooltip.tsx to Tooltip.tsx

Add licenses

Add index to components/ui

Simplify NavButton with new chakra triggers
@bbovenzi bbovenzi force-pushed the migrate-to-chakra-v3 branch from 8aa8afd to ac8b853 Compare October 31, 2024 16:37
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 🎉

I just noticed a small issue with the switch to pause/unpause dags. Request is sent and successful but in the UI it's not correctly displayed, if I refresh things are right. (stays paused or unpaused without refreshing)

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to upgrade / switch early!

A lot of UI components are added inthe PR - I assume they are missing (atm) in 3.0.0 and hopefully will be added upstream later such that we can drop the local code?

I also saw a small in-consistency - but maybe already have been before? When I enable/disable DAGs and switch from card to list view, state is not carried over. Also I think some small glitches (not sure if have been like this before) when filtering ans switching card/list view, then filters are reset. Not critical to merge.

LGTM! (Wow a big change!)

@bbovenzi
Copy link
Contributor Author

bbovenzi commented Nov 1, 2024

Good to upgrade / switch early!

A lot of UI components are added inthe PR - I assume they are missing (atm) in 3.0.0 and hopefully will be added upstream later such that we can drop the local code?

I also saw a small in-consistency - but maybe already have been before? When I enable/disable DAGs and switch from card to list view, state is not carried over. Also I think some small glitches (not sure if have been like this before) when filtering ans switching card/list view, then filters are reset. Not critical to merge.

LGTM! (Wow a big change!)

Chakra v3 switched to open components which gives a lot easier ways to customize them, but also means you need to build a lot yourself. Hence the new components/ui directory. Those are all generated from chakra ui snippets. I just commented on an issue on the ChakraUI repo to request their snippets be provided as a separate package so we'd only need to add the components we actually want to customize.

Pierre had a similar issue with the pause/unpause dags. Somehow rm -rf node_modules && pnpm install fixed it for him. Let me know if those work for those two issues.

Copy link
Contributor

@ryanahamilton ryanahamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exciting stuff—looks great!

bbovenzi and others added 2 commits November 1, 2024 11:07
@bbovenzi bbovenzi merged commit bd74cf8 into apache:main Nov 1, 2024
51 checks passed
@bbovenzi bbovenzi deleted the migrate-to-chakra-v3 branch November 1, 2024 17:43
@jscheffl
Copy link
Contributor

jscheffl commented Nov 1, 2024

Pierre had a similar issue with the pause/unpause dags. Somehow rm -rf node_modules && pnpm install fixed it for him. Let me know if those work for those two issues.

Sorry, too late... but comments were not planned to block merge... so all good!

ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
* Migrate to chakra v3

Fix react-select and tests

Rename alert.tsx to Alert.tsx

Rename menu.tsx to Menu.tsx

Rename tag.tsx to Tag.tsx

Rename tooltip.tsx to Tooltip.tsx

Add licenses

Add index to components/ui

Simplify NavButton with new chakra triggers

* Clean up default exports and tsx->ts filenames

* Update airflow/ui/src/components/ui/index.ts

Co-authored-by: Ryan Hamilton <ryan@ryanahamilton.com>

* Fix styling from code suggestion

---------

Co-authored-by: Ryan Hamilton <ryan@ryanahamilton.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AIP-38 | Migrate UI to Chakra v3
4 participants