-
Notifications
You must be signed in to change notification settings - Fork 107
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
Change primaryLinks to use href and text instead of url and label #1083
Change primaryLinks to use href and text instead of url and label #1083
Conversation
Removes the link to `"/"` labelled `"Home"`, which is currently hardcoded, and only shows up within the navigation menu on mobile screen widths. This link may not be appropriate for all services, which might not have a homepage, or might use a different path for it. It is also unclear whether having a homepage link is always needed in the navigation if the NHS logo also goes to the homepage.
Change the primaryLinks in the Header component to use `href` and `text` param names instead of `url` and `label`. This improves consistency with other components. The previous param names are still supported for backwards-compatibility (but could be dropped in future?)
Yes, been meaning to suggest this. Worth making the corresponding change to the footer component too? While we're at it, shall we change |
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.
Confirm this is not a breaking change?
9ab62ce
to
a1ee8c1
Compare
@edwardhorsford depends if we want to keep it backwards-compatible or not (currently in the PR it is). But I was thinking that this would go out with all the other Header changes in the next breaking change release – this PR is to merge into the other PR for that, #1058. |
I'll merge this into #1058 for now, and we can decide whether to keep the backwards-compatibility later. |
Currently we have a mix of components which use
href
andtext
for links (Action link, Back link, Breadcrumbs, Card, Contents list, Summary list, Skip link, Task list) and those which useurl
andlabel
(Header and Footer)This is pretty confusing, and caught me out again the other day.
Given we’re changing the Header component anyway, maybe now is the time to switch it over to
href
andtext
for improved consistency?We could continue to support the old param names (as this PR current does) for backwards-compatibility, or drop them and advise people to switch over straight away?