Skip to content

Commit 0a7edf6

Browse files
openshift-cherrypick-robotGitHub Actions
andauthored
[release-1.10] RHIDP-12605: Phase 2 Homepage - persona support and related RBAC (#2219)
* Ignore Claude Code session files * Phase 2 Homepage - persona support and related RBAC * Update the Phase 2 Homepage * Update the files * Update the files * Apply minimalism * Update titles to be JTBD specific * Fix CQA checks and JTBD titles * Apply technical reviewers suggestions * Apply peers suggestions * Apply peers suggestions * Apply technical reviewers suggestions --------- Co-authored-by: GitHub Actions <github-actions@github.com>
1 parent adb9cf2 commit 0a7edf6

12 files changed

Lines changed: 562 additions & 42 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ catalog-info.yaml
1414
.claude/settings.json.backup
1515
build-report.json
1616
.lycheecache
17-
build/.cache/
17+
build/.cache/

assemblies/configure_customizing-rhdh/assembly-customize-the-home-page.adoc

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
ifdef::context[:parent-context: {context}]
3+
4+
[id="deploy-persona-specific-homepages-to-provide-targeted-content-to-distinct-teams_{context}"]
5+
= Deploy persona-specific homepages to provide targeted content to distinct teams
6+
7+
:previouscontext: {context}
8+
:context: deploy-persona-specific-homepages-to-provide-targeted-content-to-distinct-teams
9+
10+
[role="_abstract"]
11+
Persona-specific homepage layouts allow you to deliver targeted content, such as role-appropriate templates and links, to distinct user groups in {product}.
12+
13+
// Configuring persona-based homepages
14+
15+
include::../modules/shared/proc-author-default-persona-based-layouts-to-curate-distinct-starting-experiences.adoc[leveloffset=+1]
16+
17+
include::../modules/shared/proc-attach-homepages-to-groups-to-control-access-and-automate-layout-assignment.adoc[leveloffset=+1]
18+
19+
include::../modules/shared/ref-homepage-backend-configuration-reference.adoc[leveloffset=+1]
20+
21+
include::../modules/shared/ref-homepage-visibility-rule-syntax.adoc[leveloffset=+1]
22+
23+
// Customizing homepage cards
24+
25+
include::../modules/shared/ref-available-homepage-cards.adoc[leveloffset=+1]
26+
27+
include::../modules/shared/proc-arrange-homepage-card-layouts-to-optimize-visual-organization.adoc[leveloffset=+1]
28+
29+
include::../modules/shared/proc-define-the-layout-of-the-rhdh-home-page.adoc[leveloffset=+1]
30+
31+
include::../modules/shared/proc-customize-your-dynamic-homepage.adoc[leveloffset=+1]
32+
33+
include::../modules/shared/proc-customize-quickaccesscard-card-icons-on-the-rhdh-homepage.adoc[leveloffset=+1]
34+
35+
:context: {previouscontext}
36+
:!previouscontext:
37+
38+
ifdef::parent-context[:context: {parent-context}]
39+
ifndef::parent-context[:!context:]

assemblies/shared/assembly-delegate-role-based-access-controls-rbac-access-in-rhdh.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ By delegating RBAC access through either method, you can expect the following ou
2727
* Visibility of other users' or teams' permissions is restricted.
2828
* Administrators retain overarching control while delegating team-specific access.
2929

30+
Use groups to configure persona-specific homepage layouts, ensuring users see homepage content appropriate to their role.
31+
3032
include::../modules/shared/proc-delegate-rbac-access-in-rhdh-by-using-the-web-ui.adoc[leveloffset=+1]
3133

3234

modules/shared/proc-customize-the-home-page-cards.adoc renamed to modules/shared/proc-arrange-homepage-card-layouts-to-optimize-visual-organization.adoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
:_mod-docs-content-type: PROCEDURE
22

3-
[id="customize-the-home-page-cards_{context}"]
4-
= Customize the Home page cards
3+
[id="arrange-homepage-card-layouts-to-optimize-visual-organization_{context}"]
4+
= Arrange homepage card layouts to optimize visual organization
55

66
[role="_abstract"]
7-
As an administrator, you can customize the layout and content of the Home page to create a tailored user experience. This includes integrating various specialized cards into the primary view.
7+
Arrange and customize homepage card layouts to ensure your content scales correctly across different screen sizes.
88

9-
The Home page layout uses a 12-column grid system. You can precisely define the position (x), width (w), and height (h) for each card across multiple screen breakpoints:
9+
The Home page layout uses a 12-column grid system.
10+
The grid uses the following layout properties:
11+
12+
* `w` (width): Number of columns (1-12)
13+
* `h` (height): Number of grid rows (arbitrary units)
14+
* `x` (x-position): Column offset (0-11)
15+
* `y` (y-position): Row offset (optional, defaults to auto-placement)
16+
17+
You can define these layout properties for each card across multiple screen breakpoints:
1018

1119
* Extra-large (xl)
1220
* Large (lg)
@@ -59,7 +67,9 @@ dynamicPlugins:
5967
----
6068

6169
.Prerequisites
70+
6271
* You have administrative access and can modify the `{my-app-config-file}` file for dynamic plugin configurations.
72+
* Optional: For persona-based homepage configuration, you have installed and configured the homepage backend plugin.
6373

6474
.Procedure
6575
* Configure different cards for your Home page in {product} as shown in the following code:
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="attach-homepages-to-groups-to-control-access-and-automate-layout-assignment_{context}"]
4+
= Attach homepages to groups to control access and automate layout assignment
5+
6+
[role="_abstract"]
7+
Assign persona-specific homepage layouts to user groups to automate role-based content access.
8+
9+
.Prerequisites
10+
11+
* You have {product} {product-version} or later running with the homepage backend plugin enabled.
12+
* You defined groups for each user persona (for example, `group:default/developers`, `group:default/data-scientists`, `group:default/managers`).
13+
* You authored persona-based homepage layouts in your `{my-app-config-file}` configuration file.
14+
* You have administrative access to modify the `{my-app-config-file}` configuration file.
15+
16+
.Procedure
17+
18+
. Identify your user personas and their corresponding groups.
19+
+
20+
--
21+
[IMPORTANT]
22+
====
23+
Replace the example group names below with your organization's actual group names.
24+
====
25+
26+
[options="header"]
27+
|===
28+
|Persona |Group
29+
|Developer |`group:default/developers`
30+
|Manager |`group:default/managers`
31+
|Data Scientist |`group:default/data-scientists`
32+
|===
33+
--
34+
35+
. Verify that you created the groups in your {product-very-short} configuration.
36+
+
37+
Check that the groups exist by using the RBAC web UI or by reviewing your RBAC configuration file.
38+
You must create all groups referenced in your persona mapping before configuring homepage visibility.
39+
40+
. Open your `{my-app-config-file}` configuration file.
41+
42+
. Attach persona-specific layouts to groups by adding the `if.groups` field to group cards under a shared visibility condition.
43+
+
44+
For example, attach the developer persona layout to the developers group:
45+
+
46+
[source,yaml]
47+
----
48+
homepage:
49+
defaultWidgets:
50+
# Attach developer layout to developers group
51+
- if:
52+
groups: [group:default/developers]
53+
children:
54+
- id: developer-onboarding
55+
ref: 'rhdh-onboarding-section'
56+
layout:
57+
xl: { w: 12, h: 6 }
58+
lg: { w: 12, h: 6 }
59+
60+
- id: developer-quickaccess
61+
ref: quickaccess-card
62+
props:
63+
title: Developer Quick Access
64+
layout:
65+
xl: { w: 7, h: 8 }
66+
lg: { w: 7, h: 8 }
67+
68+
- id: templates
69+
ref: TemplateSection
70+
layout:
71+
xl: { w: 12, h: 5 }
72+
lg: { w: 12, h: 5 }
73+
74+
- id: starred-entities
75+
ref: CatalogStarredEntitiesCard
76+
layout:
77+
xl: { w: 5, h: 4, x: 7 }
78+
lg: { w: 5, h: 4, x: 7 }
79+
----
80+
+
81+
The `groups` field accepts an array of group entity references.
82+
Users who belong to any of the listed groups see all child cards.
83+
84+
. Control visibility for multiple groups by adding additional `if.groups` configurations.
85+
+
86+
Individual child cards can include their own `if` conditions to further restrict visibility beyond the parent group's rules.
87+
+
88+
[NOTE]
89+
====
90+
The front-end positions cards according to layout coordinates (`x`, `y`, `w`, `h`), not array order.
91+
The configuration array order does not affect rendering position.
92+
====
93+
94+
. Save the configuration file and restart {product}:
95+
+
96+
[source,terminal,subs="+quotes"]
97+
----
98+
$ kubectl rollout restart deployment/_<rhdh-deployment-name>_
99+
----
100+
+
101+
Replace _<rhdh-deployment-name>_ with the name of your {product-very-short} deployment.
102+
+
103+
[IMPORTANT]
104+
====
105+
{product-very-short} validates the homepage configuration at startup.
106+
If the configuration contains errors, {product-very-short} will fail to start.
107+
Check the pod logs for configuration validation errors if the deployment does not become ready.
108+
====
109+
110+
.Verification
111+
112+
. Log in to {product} as a test user who belongs to one of the configured groups.
113+
+
114+
The homepage displays only the cards configured for that user's persona.
115+
116+
. Log in as a test user from a different group.
117+
+
118+
The homepage displays a different set of cards based on the second user's group membership.
119+
120+
. Log in as a test user who does not belong to any persona-specific group.
121+
+
122+
The homepage displays only the default cards that have no `if` conditions.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="author-default-persona-based-layouts-to-curate-distinct-starting-experiences_{context}"]
4+
= Author default persona-based layouts to curate distinct starting experiences
5+
6+
[role="_abstract"]
7+
Author default persona-based homepage layouts for different user roles to curate distinct starting experiences by selecting appropriate cards, templates, and resources that match each persona's workflow needs.
8+
9+
.Prerequisites
10+
11+
* You have {product} {product-version} or later running with the homepage backend plugin enabled.
12+
* You have administrative access to modify the `{my-app-config-file}` configuration file.
13+
14+
.Procedure
15+
16+
. Identify your user personas and their workflow needs.
17+
+
18+
--
19+
Plan which types of content each persona requires on their homepage.
20+
21+
Example persona planning:
22+
23+
[options="header"]
24+
|===
25+
|Persona |Primary Tasks |Needed Homepage Content
26+
|Developer |Write code, deploy services, review PRs |Templates, catalog, quick access to repos
27+
|Manager |Monitor team progress, review metrics |Dashboards, reports, team activity
28+
|Data Scientist |Run experiments, access data |Notebooks, data sources, model registry
29+
|===
30+
--
31+
32+
. Open your `{my-app-config-file}` configuration file.
33+
34+
. Define the homepage layout structure for each persona in the `homepage.defaultWidgets` section.
35+
+
36+
For example, configure a developer persona homepage with cards appropriate for development workflows:
37+
+
38+
[source,yaml]
39+
----
40+
homepage:
41+
defaultWidgets:
42+
# Developer persona layout
43+
- id: developer-onboarding
44+
ref: 'rhdh-onboarding-section'
45+
layout:
46+
xl: { w: 12, h: 6 }
47+
lg: { w: 12, h: 6 }
48+
49+
- id: developer-quickaccess
50+
ref: quickaccess-card
51+
props:
52+
title: Developer Quick Access
53+
layout:
54+
xl: { w: 7, h: 8 }
55+
lg: { w: 7, h: 8 }
56+
57+
- id: templates
58+
ref: TemplateSection
59+
layout:
60+
xl: { w: 12, h: 5 }
61+
lg: { w: 12, h: 5 }
62+
63+
- id: starred-entities
64+
ref: CatalogStarredEntitiesCard
65+
layout:
66+
xl: { w: 5, h: 4, x: 7 }
67+
lg: { w: 5, h: 4, x: 7 }
68+
----
69+
+
70+
The layout uses a 12-column grid system with properties:
71+
+
72+
.. `w` (width): Number of columns (1-12)
73+
.. `h` (height): Number of grid rows
74+
.. `x` (x-position): Column offset (0-11)
75+
.. `y` (y-position): Row offset (optional)
76+
77+
. Configure a default homepage layout that all users can see.
78+
+
79+
Create cards without visibility conditions so that all authenticated users see essential homepage content:
80+
+
81+
[source,yaml]
82+
----
83+
# Default cards visible to all users
84+
- id: onboarding
85+
ref: 'rhdh-onboarding-section'
86+
layout:
87+
xl: { w: 12, h: 6 }
88+
89+
- id: quickaccess-card
90+
ref: quickaccess-card
91+
layout:
92+
xl: { w: 6, h: 6 }
93+
----
94+
95+
. Save the configuration file.
96+
+
97+
[NOTE]
98+
====
99+
The layouts you authored are not yet restricted to specific user groups.
100+
To control which personas see which layouts, proceed to attach these layouts to RBAC groups.
101+
====

modules/shared/proc-customize-the-learning-paths-by-using-a-hosted-json-file.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ proxy:
4848
====
4949

5050
.Additional resources
51-
* xref:customize-the-home-page_customizing-rhdh[Customize the Home page]
51+
* xref:deploy-persona-specific-homepages-to-provide-targeted-content-to-distinct-teams_customizing-rhdh[Deploy persona-specific homepages to provide targeted content to distinct teams]

modules/shared/ref-available-homepage-cards.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
= Available homepage cards
55

66
[role="_abstract"]
7-
As an administrative user, you can easily integrate custom features or content from any installed plugin into your Home page layout. You can use the additional cards available for configuration based on the front-end plugins you enable.
7+
Integrate custom features from installed plugins into your Home page by using available cards.
8+
Configure card visibility by attaching cards to RBAC groups using visibility rules.
89

910
The following is a list of the available homepage cards:
1011

@@ -15,8 +16,8 @@ The following is a list of the available homepage cards:
1516
** Placeholder
1617
** Catalog starred entities
1718
** Featured docs
18-
+
19+
1920
[NOTE]
2021
====
21-
Each card can have a `layouts` definition and `props` that depend on the component you use.
22+
Each card can have a `layouts` definition, `props` that depend on the component you use, and optional `visibilityRules` to control which users can see the card.
2223
====

0 commit comments

Comments
 (0)