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

Fix @mui/styled #1085

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JulianKniephoff
Copy link
Member

This PR does two things:

  • Get rid of styled-components
    We were using it in one place only, and while there are certainly some advantages over dynamic inline styles, we are using those pervasively as well anyway. Plus, we pull in MUI for some stuff, which by default relies on Emotion for that stuff, so if we want those benefits, I would propose that it's at least worth considering to get them through that.

  • Explicitly npm install @emotion/react @emotion/styled
    As per https://mui.com/material-ui/getting-started/installation/#default-installation.

    These were installed as (optional?) transitive (peer?) dependencies, but that can of course change randomly. I've seen this happen while preparing a custom build of this repo.

    Note that there is also https://mui.com/material-ui/getting-started/installation/#with-styled-components, which is arguably more fitting to this project, because we were already using styled-components, but I opted for this solution because it seemed simpler and better supported, and also because our usage of styled-components isn't really justified. However, see the previous commit for that.

We were using it in one place only,
and while there are certainly some advantages over dynamic inline styles,
we are using those pervasively as well anyway.
Plus, we pull in MUI for some stuff,
which by default relies on Emotion for that stuff,
so if we want those benefits,
I would propose that it's at least worth considering
to get them through that.
As per https://mui.com/material-ui/getting-started/installation/#default-installation.

These were installed as (optional?) transitive (peer?) dependencies,
but that can of course change randomly.
I've seen this happen while preparing a custom build of this repo.

Note that there is also https://mui.com/material-ui/getting-started/installation/#with-styled-components,
which is arguably more fitting to this project,
because we were already using `styled-components`,
but I opted for this solution because it seemed simpler and better supported,
and also because our usage of `styled-components` isn't really justified.
However, see the previous commit for that.
@JulianKniephoff JulianKniephoff added the type:dependencies Pull requests that update a dependency file label Jan 27, 2025
Copy link
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1085

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-1085

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

Copy link
Contributor

github-actions bot commented Jan 27, 2025

This pull request is deployed at test.admin-interface.opencast.org/1085/2025-01-30_16-11-40/ .
It might take a few minutes for it to become available.

This comment was marked as resolved.

1 similar comment

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant