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

() breaks title in devui #39992

Closed
maxandersen opened this issue Apr 10, 2024 · 3 comments · Fixed by #40002
Closed

() breaks title in devui #39992

maxandersen opened this issue Apr 10, 2024 · 3 comments · Fixed by #40002
Assignees
Labels
area/dev-ui kind/bug Something isn't working
Milestone

Comments

@maxandersen
Copy link
Member

Describe the bug

card.addPage(Page.externalPageBuilder("HomeAssistant (admin/secret)")
                        .url(uiPath, uiPath)
                        .isHtmlContent()
                        .icon("font-awesome-solid:house"));

result in url generated to have () in it and then not work.

raises 3 questions:

  1. should ( and / and ) not be escape or at least properly routed?
  2. is there a better way to handle adding info in the label/title
  3. i.e. should I be able to set componentName separate from the human readable title?

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@maxandersen maxandersen added the kind/bug Something isn't working label Apr 10, 2024
Copy link

quarkus-bot bot commented Apr 10, 2024

/cc @cescoffier (devui), @phillip-kruger (devui)

@gastaldi
Copy link
Contributor

How about sanitizing the component name to remove the weird chars (replacing with _ for example)?

@phillip-kruger
Copy link
Member

phillip-kruger commented Apr 11, 2024

This PR (#40002) will fix the issue.

  1. should ( and / and ) not be escape or at least properly routed?

Yes. Fixed by the PR above.

  1. is there a better way to handle adding info in the label/title

The idea is to use labels for these kind of things. Label can be static, dynamic, or even streaming (see https://quarkus.io/guides/dev-ui#adding-labels). But, in your case you are using the external url feature, and that is just a predefined static label. The PR above adds a feature that allows multiple static labels.

3 i.e. should I be able to set componentName separate from the human readable title?

The componentName and the title can be different. In your case however, you are not providing a component (you are using a built-in component, called qwc-external-page)

Workaround options:

After PR is merged

Once the PR above is merged and available you can do this:

cardPageBuildItem.addPage(Page.externalPageBuilder("HomeAssistant")
                .staticLabel("admin/secret")
                .icon("font-awesome-solid:house")
                .isHtmlContent()
                .url(uiPath, uiPath));

And it will render like this:

Home2

@quarkus-bot quarkus-bot bot added this to the 3.10 - main milestone Apr 11, 2024
@gsmet gsmet modified the milestones: 3.10.0.CR1, 3.9.4 Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-ui kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants