Skip to content

Reduce duplicate code for NavBar components#1017

Merged
Arnei merged 6 commits intoopencast:mainfrom
Arnei:reduce-duplicate-code-navigation
Feb 11, 2025
Merged

Reduce duplicate code for NavBar components#1017
Arnei merged 6 commits intoopencast:mainfrom
Arnei:reduce-duplicate-code-navigation

Conversation

@Arnei
Copy link
Copy Markdown
Member

@Arnei Arnei commented Dec 17, 2024

This patch attempts to reduce duplicate code by moving components that would usually be passed to the NavBar component INTO the NavBar component.

This does come with the trade-off that the NavBar component is now less general. However, as it is the NavBar component was pretty pointless anyway so this should not be an issue.

This is the "NavBar":
Bildschirmfoto vom 2024-12-17 09-42-22

How to test this

Can be tested as usual, no configuration or Opencast patch necessary. There should be no functional changes, so the main thing to test here is that everything behaves as usual.

This patch attempts to reduce duplicate code by
moving components that would usually be
passed to the NavBar component INTO the
NavBar component.

This does come with the trade-off that the
NavBar component is now less general. However,
as it is the NavBar component was pretty
pointless anyway so this should not be an issue.
@Arnei Arnei added the type:code-enhancement Internal improvements to the codebase label Dec 17, 2024
@github-actions
Copy link
Copy Markdown
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-1017

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-1017

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 17, 2024

This pull request is deployed at test.admin-interface.opencast.org/1017/2025-02-11_09-03-16/ .
It might take a few minutes for it to become available.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@Arnei Arnei force-pushed the reduce-duplicate-code-navigation branch from e29fb28 to 0bfa3e4 Compare January 15, 2025 15:06
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Copy link
Copy Markdown
Contributor

@owi92 owi92 left a comment

Choose a reason for hiding this comment

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

As far as I can tell, there are no functional changes, so it behaves as described and expected. Code looks reasonable (Maybe you could factor out some more stuff, but this is already a good improvement and enough for now imo).

Comment thread src/components/events/Events.tsx
@Arnei Arnei merged commit d67e437 into opencast:main Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:code-enhancement Internal improvements to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants