Skip to content

Conversation

MichaelBuessemeyer
Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer commented Mar 30, 2021

Upgrade UI library antd to version 4, creating a slightly more modern look and behavior of many UI elements and reducing technical debt.

URL of deployed dev instance (used for testing):

Steps to test:

Issues:


@philippotto
Copy link
Member

Yes, that was me :)
Which browser do you use? With Chrome and Firefox it looks like this on Linux:
image
Seems alright to me. How does it look for you?

Here it looks very good, but in the td view controls the Button to load isosurfaces is slightly lower than the others. Maybe that's not really bad, but I can't unsee it. (I'm on Linux with Firefox)
With Spaces:
Screenshot from 2021-04-06 18-18-24

With the group:
Screenshot from 2021-04-06 18-21-40

Probably the Tooltip around the last button messes the alignment slightly up.

Should be fixed now :)

@philippotto
Copy link
Member

The icon that is used for expanding / collapsing is still broken for me (Firefox, Linux)

Hmm, did you test the newest version? The dev instance is probably not up to date. If there are still issues, let's have a call to talk about this.

What exactly do you mean by broken? The behavior is fine for me now. However, the icon itself looks weird. There is a fancy animation combining the bars of the plus sign to the minus sign, but this comes at a cost. On non-hidpi-screen the horizontal line of the plus is completely swallowed at 100% zoom.
image
When I zoom in a lot it reappears, but does not look very nice still
image
(Firefox Windows)
This looked much nicer in the old antd version In Chrome (Windows) it seems to work ok.

The actual button works for me, too. Regarding the rendering: it's not optimal, but shouldn't be blocking for this PR imo.

@MichaelBuessemeyer
Copy link
Contributor Author

MichaelBuessemeyer commented Apr 7, 2021

The icon that is used for expanding / collapsing is still broken for me (Firefox, Linux)

Hmm, did you test the newest version? The dev instance is probably not up to date. If there are still issues, let's have a call to talk about this.

What exactly do you mean by broken? The behavior is fine for me now. However, the icon itself looks weird. There is a fancy animation combining the bars of the plus sign to the minus sign, but this comes at a cost. On non-hidpi-screen the horizontal line of the plus is completely swallowed at 100% zoom.
image
When I zoom in a lot it reappears, but does not look very nice still
image
(Firefox Windows)
This looked much nicer in the old antd version thinking In Chrome (Windows) it seems to work ok.

Thx @fm3, that is exactly my problem. I can confirm that in firefox the issue is resolved by zooming and that chrome looks fine.
Maybe this is quite the firefox bug as the zoom causes it to render correctly :/

The actual button works for me, too. Regarding the rendering: it's not optimal, but shouldn't be blocking for this PR imo.

I agree to that 👍

@philippotto
Copy link
Member

The icon that is used for expanding / collapsing is still broken for me (Firefox, Linux)

Hmm, did you test the newest version? The dev instance is probably not up to date. If there are still issues, let's have a call to talk about this.

What exactly do you mean by broken? The behavior is fine for me now. However, the icon itself looks weird. There is a fancy animation combining the bars of the plus sign to the minus sign, but this comes at a cost. On non-hidpi-screen the horizontal line of the plus is completely swallowed at 100% zoom.
image
When I zoom in a lot it reappears, but does not look very nice still
image
(Firefox Windows)
This looked much nicer in the old antd version thinking In Chrome (Windows) it seems to work ok.

Thx @fm3, that is exactly my problem. I can confirm that in firefox the issue is resolved by zooming and that chrome looks fine.
Maybe this is quite the firefox bug as the zoom causes it to render correctly :/

The actual button works for me, too. Regarding the rendering: it's not optimal, but shouldn't be blocking for this PR imo.

I agree to that

I just found the issue in the antd repo. The issue description contains a workaround: ant-design/ant-design#29303 (comment)
Could you give that a try (simply add the CSS code to the antd overwrite less module)?

@MichaelBuessemeyer
Copy link
Contributor Author

I just found the issue in the antd repo. The issue description contains a workaround: ant-design/ant-design#29303 (comment)
Could you give that a try (simply add the CSS code to the antd overwrite less module)?

I am working on it, but it doesn't look like the correct solution :/

@fm3
Copy link
Member

fm3 commented Apr 7, 2021

  • changing user activation filter in user table leads to crash (»TypeError: this.state.activationFilter is null«)
    I changed the selection here (unchecked both, and clicked ok)
    image

@MichaelBuessemeyer
Copy link
Contributor Author

MichaelBuessemeyer commented Apr 7, 2021

I just found the issue in the antd repo. The issue description contains a workaround: ant-design/ant-design#29303 (comment)
Could you give that a try (simply add the CSS code to the antd overwrite less module)?

I am working on it, but it doesn't look like the correct solution :/

I just pushed a fix that changes the CSS of the button so that it behaves exactly as in antd v3. Therefore the bug is not present anymore but the "fancy" spinning animation on toggle is gone. I think the animation is not necessary and the current solution perfectly centers the buttons content.

@fm3 fm3 changed the title [WIP] Upgrade antd to version 4 Upgrade antd to version 4 Apr 7, 2021
@fm3 fm3 marked this pull request as ready for review April 7, 2021 09:32
@MichaelBuessemeyer
Copy link
Contributor Author

* [ ]  changing user activation filter in user table leads to crash (»TypeError: this.state.activationFilter is null«)
  I changed the selection here (unchecked both, and clicked ok)
  ![image](https://user-images.githubusercontent.com/1390035/113841318-dedcda80-9791-11eb-8bb4-458515ba8d49.png)

@fm3 Could you please check whether my newest commit fixes this bug?

The interface of the this kind of filters slightly changed. In antd version 3 an empty selection / reset meant an empty array and in the current version this is instead null. I simply catch this potential error with an ternary / if-else and set it manually to an empty array.

@fm3
Copy link
Member

fm3 commented Apr 7, 2021

@MichaelBuessemeyer Works for me now :)

Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

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

🚀

@philippotto philippotto merged commit 61d3bee into master Apr 7, 2021
@philippotto philippotto deleted the upgrade-antd branch April 7, 2021 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text gets selected when adjusting histogram sliders Update antd to v4.x

5 participants