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

Admin UI: Show realm display name on welcome page #25897

Closed
Jamstah opened this issue Jan 4, 2024 · 17 comments · Fixed by #26562
Closed

Admin UI: Show realm display name on welcome page #25897

Jamstah opened this issue Jan 4, 2024 · 17 comments · Fixed by #26562

Comments

@Jamstah
Copy link

Jamstah commented Jan 4, 2024

The welcome page of the admin console uses the realm id, I think it should use the display name (if available) and fall back to the realm id.

In this example, the id is cloudpak and the display name is "Cloud Pak"

The login page does this right and uses the display name where available.

image

@Jamstah Jamstah added kind/enhancement Categorizes a PR related to an enhancement status/triage labels Jan 4, 2024
@jonkoops
Copy link
Contributor

jonkoops commented Jan 4, 2024

Yeah, this seems like a nice enhancement, I will add this to the backlog and mark it as 'help wanted'

@dipeshsingh253
Copy link
Contributor

Hi @jonkoops , this looks like a good start to contribute to Keycloak. Can I work on this issue?

@malavmevada
Copy link

Hii @jonkoops , I have been working on keycloak since 1 month. I think I'm able to solve this issue. If possible please assign this issue to me.

@jonkoops
Copy link
Contributor

jonkoops commented Jan 4, 2024

I'll assign this to you @dipeshsingh253, thanks! @malavmevada if you are looking to pick up an issue there are others that can be picked up.

@dipeshsingh253
Copy link
Contributor

Thanks @jonkoops for this opportunity !!!

@jonkoops
Copy link
Contributor

jonkoops commented Jan 6, 2024

No problem, do let me know if you need any assistance 😄

@dipeshsingh253
Copy link
Contributor

dipeshsingh253 commented Jan 6, 2024

Hi @jonkoops , I am following this guide to set development environment in my local, though it is taking a lot of time(I left it for somewhere around 2-3 hrs and when I came back it was still running) to execute ./mvnw clean install . Are there any missing steps that I should consider before executing ./mvnw clean install ?

@jonkoops
Copy link
Contributor

jonkoops commented Jan 7, 2024

It's likely that you need to pass -DskipTest, otherwise the tests will also run, which can take extremely long if you are running everything.

To get started with development on the Administration Console you won't need to build Keycloak per-se, instead you can opt-to use a nightly build of Keycloak and develop against that. You can find information on how to to that in the README of the Administration Console.

@dipeshsingh253
Copy link
Contributor

dipeshsingh253 commented Jan 9, 2024

Hi @jonkoops , thanks for your assistance, now I can run keycloak-server and admin-ui locally. However, I would love to share a minor error I faced while setting up the local environment for Keycloak. First I tried to follow these instructions in Windows and I faced this error while executing the start script of keycloak-server.

NOTE : I have tried powershell and windows terminal aswell, then used git bash and wsl but still did not work in windows.

image

But it worked smoothly when I followed the same steps on a Linux device. I will raise a PR by the end of this week for this as I currently don't have access to my Linux device. but I have already located the file where I need to make changes so it won't take much time.

@jonkoops
Copy link
Contributor

jonkoops commented Jan 9, 2024

Hey @dipeshsingh253, good catch. Most of our developers are not on Windows machines, so it's likely that some of our scripts might not work on Windows. I have created a fix for this specific problem under #26025, could you review that PR and see if that resolves your issue?

@dipeshsingh253
Copy link
Contributor

dipeshsingh253 commented Jan 12, 2024

Hi @jonkoops , I have contributed to other projects as well, and there I had to fork it and work on it(it was mentioned in their contributor's guide), but here I can not see those same patterns in Keycloak's contributor guide, and instead of pull it says to use rebase. Just some doubt so I can start working and raise the PR,

  1. Do we have to work directly on the main branch as there are no mentions for the branch in the guide and create PR for it only?
  2. Do I even need to fork the repo to work on issues, or can we directly clone and start working on the original repo as there is no mention of forking and creating a specific branch related to working issues in the guide?
  3. Do we have any community on Slack or Discord etc?

Thanks !!!

@jonkoops
Copy link
Contributor

Hi @dipeshsingh253, we do assume that you fork our repository. I think the guide simply assumes that the user is familiar with the GitHub contribution guide. I agree that our documentation is lacking here, perhaps you could open a PR to add this link to the contribution guide?

  1. Ideally you create a new branch on your fork under a name that matches the functionality that you are trying to implement (e.g show-name-welcome) and contribute that as a PR. Using the main branch from your fork will prevent maintainers from editing it, which complicates contribution.
  2. Like mentioned before, I recommend forking the repository, you will not be able to push to our repo, as you do not have the rights to push to it.
  3. You can find all our communication channels on the Community page, but I would recommend targeted communication like this remain in GitHub, where we are most active.

If you feel like anything is missing from the contribution guide, feel free to open a PR to improve it, and I will make sure to get you a review.

@dipeshsingh253
Copy link
Contributor

Hi @jonkoops , Sorry for the delay I just got my Linux device yesterday. I noticed that we are using the URL to get realmName to display on the welcome page, here this file, so I am not sure how can I get the displayName on welcome-page, we can see the displayName on login page for realm :
image

I could check the file for the login page to get the display name, but I was not able to locate this file yet. If you have the idea can you help me where should I look for it?

@agagancarczyk
Copy link
Contributor

hi @dipeshsingh253 We have recently implemented this in the welcome tab. Please take a look at this code https://github.com/keycloak/keycloak/blob/main/js/apps/admin-ui/src/dashboard/Dashboard.tsx#L133 . I believe this is what you want to use as well.

@dipeshsingh253
Copy link
Contributor

Hi @agagancarczyk , thanks I was exactly looking for this. But there is a bug and I am sure it should not be there somehow I am not able to display the realmName when the displayName for that realm is not available.

image
image

I also verified the same scenario for the default dashboard of MasterRealm by removing the displayName for it.
image

@jonkoops
Copy link
Contributor

Try using || instead of ??, it might be that displayName is an empty string. Using the nullish coalescing operator means that empty strings are also included.

@dipeshsingh253
Copy link
Contributor

Hi @jonkoops, I have created the PR. Please review it whenever you have time and let me know if there are any modifications needed.

Thanks for the opportunity !!!

jonkoops pushed a commit that referenced this issue Jan 29, 2024
Closes #25897

Signed-off-by: dipeshsingh253 <sinhdipesh@gmail.com>
@ahus1 ahus1 removed this from the Backlog milestone Mar 6, 2024
ahus1 pushed a commit to ahus1/keycloak that referenced this issue Mar 22, 2024
Closes keycloak#25897

Signed-off-by: dipeshsingh253 <sinhdipesh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants