-
Notifications
You must be signed in to change notification settings - Fork 1
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
CDPT-1939: Splash page #800
Conversation
EmilyHazlehurst
commented
Dec 13, 2024
- Redirect users to a simplified version of the agency switcher when they don't have a cookie set.
- Allow users access to the accessibility and privacy policy pages before setting a cookie, but use the simplified header
- Redirect users to a simplified version of the agency switcher when they don't have a cookie set. - Allow users access to the accessibility and privacy policy pages before setting a cookie, but use the simplified header
- Redirect users to a simplified version of the agency switcher when they don't have a cookie set. - Allow users access to the accessibility and privacy policy pages before setting a cookie, but use the simplified header
- Redirect users to a simplified version of the agency switcher when they don't have a cookie set. - Allow users access to the accessibility and privacy policy pages before setting a cookie, but use the simplified header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works really nicely locally, I've added a few comments.
In addition to those, do you think it would be worth bringing an extra feature into the scope of the ticket? ...
The user could be redirected to their page after selecting an agency on their first visit.
This could be useful if a link to a specific intranet page is circulated via email. Otherwise, after opening a link, a new intranet user will always land on the homepage.
It could work similarly to what happens when a specific admin page is accessed by a logged out user.
e.g.
http://intranet.docker/wp/wp-admin/edit.php?post_type=page
redirects to
http://intranet.docker/wp/wp-login.php?redirect_to=http%3A%2F%2Fintranet.docker%2Fwp%2Fwp-admin%2Fedit.php%3Fpost_type%3Dpage&reauth=1
and after a successful login, the user is redirected to their original page.
Thanks for reviewing @EarthlingDavey! I did consider this. The reason I decided against it in the end was because of the way agency branding works on the intranet. Just as an example, I'm a new hire who hasn't accessed the intranet before:
I suppose they're going to have that confusion anyway though once they go back to the link that was shared originally... Maybe this can stay as is for now, but I'll make an improvement ticket? There might be a bigger discussion to be had around how shared content is handled on the intranet. |
Hey @EmilyHazlehurst , I see that there probably isn't a perfect solution to this - especially while there is the underlying issue/feature of an agency's page being branded as whichever one has been selected in the agency picker. I do think that we should be cautious that, while aiming to improve the UX, we in fact degrade it for a subset of users. In terms of new users clicking a link in Slack or an email: Currently: Pro: they will get to the correct page With this PR: Pro: the user will pick an agency This could be confusing to the user, best case scenario they will re-click the link, worst-case scenario they assume that the link is broken. With a redirect: Pro: the user will pick an agency and land on the correct page I feel like the downside in this case is the lesser of all 3. As the end result is that the user finds the content that was linked. |
Hey @EmilyHazlehurst @EarthlingDavey Thank you both for the wonderful discussions here! There is a bigger discussion to be had around the working of links clicked. Davey's suggestion sits best, as we know at the point of click where the user wants to be. We shouldn't be creating additional clicks for them, especially if they have been given a link (as a new starter) that is HQ content. Lots of HQ content is still relevant in the HMCTS context so again, we should allow the user to navigate to the content they are trying to view, under the banner of the intranet they are expecting. Please also bear in mind that heavy user research has been applied in this very area. The intranet is operating as it does today as a result of this user research. With that said, I am very open to a discussion about best practices here, we may indeed be limiting the user experience. If we decide that usability is degraded as a result of the current working, we should make moves to engage our User Research colleagues to determine the best and most up-to-date ways of operation. |
- Refine agency-switcher function and separate internal and external agencies - Add param to redirect users once they've selected an agency - Update the agency list to reflect hardcoded agency-switcher values - Wrap agency switcher list in <nav>
Hey @EmilyHazlehurst , I've seen a couple of minor snags when testing the changes locally.
Would it be possible for you to check those points, and then I'll re-review? |
Thanks @EarthlingDavey, that's odd it was working for me 🤔 I'll take a look and get back to you 🙂 |
Potentially you were not getting cached pages for a different reason, like having a WordPress login cookie. |
@EarthlingDavey I'm still not able to replicate this locally. It works correctly for me even after rebuilding everything and accessing the site in private browsing mode. Please could you describe the steps you're taking? Are you logged in/out? |
Hey @EmilyHazlehurst , thanks for confirming and sorry for the bad advise! The problem was with my local setup, having previously used This is now sorted and the functionality looks like it's working! I'll review then code now and feedback ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few comments, with the send_back
one requiring a change.
public/app/themes/clarity/src/components/c-intranet-switcher/view.php
Outdated
Show resolved
Hide resolved
public/app/themes/clarity/src/components/c-intranet-switcher/view.php
Outdated
Show resolved
Hide resolved
- Add ima to agency switcher
- Validate send_back url - Move comments to docblock
- Remove HTTP_REFERER as it doesn't appear to do anything
public/app/themes/clarity/src/components/c-intranet-switcher/view.php
Dismissed
Show dismissed
Hide dismissed
- Reverse if condition
LGTM :) |