Feature: Need to add “Show More” / “Show Less” toggle in Note.#77446
Feature: Need to add “Show More” / “Show Less” toggle in Note.#77446hbhalodia wants to merge 5 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thanks @t-hamano For the review. Further, I have handled some more of edgecase. The overall functionality is like below,
Let me know if there are any other edge cases needs to be handled, I guess most of them are covered. Thanks, |
t-hamano
left a comment
There was a problem hiding this comment.
This PR works well for me.
@Mamaduka @adamsilverstein, Are there any better approaches besides using element.scrollHeight > element.clientHeight to detect element overflow and display a button?
|
@t-hamano, I'll try to do a proper review later. I think some of the logic can be simplified/derived. But without design feedback, I think final reviews are low priority, since we're not sure what the end product will be. |
|
Nice work! Good feedback has already been given, worth following. Some of the nuance embedded in this is: we have this design to consider:
But this button is not the same. This button is for when a single comment note is very long and complicated. In that sense, the PR feels fairly close. Here's a quick sketch:
Some subtle differences to the PR:
An awkward detail is that the tertiary button has left/right padding. The above mockup does not. So the text inside the button will not align with the text of the note. Probably this is fine? |
|
Unless there's a true "text only" button we can use? CC: @ciampo Edit: "Link" from |
|
cc @mirka and @jameskoster , and also mentioning #77098 as likely related. |
|
Unless the element triggers a url change I agree this should be a button. I think this is the kind of scenario we added the Unstyled variant for. |
Yes, we could try the
|




What?
Closes #72822
Why?
show more and show lessexactly as how google docs commenting works for larger notes.How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2026-04-17.at.3.13.53.PM.mov
Use of AI Tools