-
Notifications
You must be signed in to change notification settings - Fork 81
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
Implement slot for title in ListItem #3715
Conversation
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
I am not really fond of this solution. I think it's overkill to make this a slot, just for having the option to set the (native) title attribute. What's wrong with simply using Edit: Although I have to admit that this is already a lot cleaner than the watch and DOM magic implemented in nextcloud/spreed#8605. |
The trick is, we don't need this all the time. For example, in Talk it's only implemented for long names, which are covered with ellipsis and aren't fully visible. So it is better to have controlled tag, where you can apply attributes, logic, styles, e.t.c. locally. I also want to note that, as it's an open-source library, we shouldn't mess with components working good before changes. So, attribute |
Which is a nice gimmic, but if that blocks a proper and performant solution I prefer to have the title just displayed all the time. |
If that really is a requirement, we can also introduce a new prop for it. Implementation wise, we could go the same way as in #3617, introduce a new
We cannot possibly anticipate all possible ways someone is using this library. What is not documented, is not supported in my opinion. We frequently introduce new features and props. If we couldn't do this because it might break someones undocumented and unintended use-case, we would be left with an unmaintained library without progress, because every little change could break something. |
Superseded by nextcloud/spreed#11455 |
Signed-off-by: Maksim Sukharev antreesy.web@gmail.com
Problem
Right now there is no stable opportunity to manipulate 'Title' sub-component (see issues and PR below) - only through the access to DOM element via
querySelector
or using:deep
selector for scoped styles.Related:
Proposal
Add the ability to integrate a developer-controlled sub-component via Vue
slot
. Proposed solution should not affect current realisations, because required proptitle
is provided as a fallback for slot..list-item
selector doesn't inheritbox-sizing: border-box
by default (If NcContent is not used). Fixed by this PR.