-
Notifications
You must be signed in to change notification settings - Fork 88
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
NcBreadcrumb
does not render <a>
anymore when to
is provided
#5089
Comments
AH, I see what your are suggesting and referencing. I can propose a third, different change: We can revert the change made from that PR. We keep the same functionality as before if we have a 'to' or 'href' prop passed in, but if we do not have either ( I am open to all these changes, though, as making NcButton more flexible is also very nice 👍with the other proposed solutions, we would just have to make sure that everywhere that NcBreadcrumbs gets used has the correct new props to logically conclude what element needs to be rendered. Thoughts? |
Yes, reverting it completely and only using
The interface of |
Oh, I really missed that we render
According to the documentation:
But what is not said and what is unexpected to me — that this I'd consider it a bug. Even if a link uses History API, it still has a link semantics, should have a context menu, browser support and ect. @skjnldsv wasn't it done intentionally? |
I will prepare a PR to let |
See #5091. |
Don't think so no. Not being able to open in a new tab is a pretty good regression. |
The main question is whether an |
I think it should imho |
In #5077 we messed up a bit and introduced a regression while trying to fix the breadcrumbs behaviour when neither
to
norhref
are provided.The issue is that before, the breadcrumbs would always render an
<a>
, both forto
andhref
, because that is what<router-link>
does by default. So also whento
is provided, we would have an<a>
with the correcthref
set in the DOM. This is what e.g. the files app also relies on, we want the breadcrumbs to be<a>
s there, also if it is really a<router-link>
.Now,
NcButton
behaves different. It by default renders a<button>
, just when anhref
is provided (and noto
) it renders an<a>
. This breaks the breadcrumbs behaviour, as the crumbs are not<a>
s anymore, but<button>
s. Navigation still works though, but one cannot open the crumb in a new tab like a link.The question is now how to fix this.
NcButton
to render an<a>
ifto
is provided. But that might classify as breaking change toNcButton
, although one could also consider it a fix. I am not sure here.NcButton
to render an<a>
or a<button>
whento
is provided.@ShGKme @susnux @emoral435 For input. We will need to fix this before the next patch or minor release to not mess up the files app.
The text was updated successfully, but these errors were encountered: