Identify the site frontpage in link UI search results#36493
Conversation
|
This PR changes the editor settings. We need to be very careful to avoid typing performance degradation. |
|
Size Change: +142 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
| outlineMode: hasTemplate, | ||
| __experimentalCreatePageEntity: createPageEntity, | ||
| __experimentalUserCanCreatePages: userCanCreatePages, | ||
| pageOnFront, |
There was a problem hiding this comment.
@adamziel Would you mind confidence checking me here? A previous PR I created introduced a typing performance degradation because the useMemo was recomputed too frequently. Do you see any possibility of this change causing that?
There was a problem hiding this comment.
On the first sight it seems safe – I don't suppose pageOnFront will change that often. What's your previous PR? I'd like to compare the two.
There was a problem hiding this comment.
I commented with my assessment there. pageOnFront seems to be be safe as it is a number, not a function (As long as it's not a NaN). Full disclosure, I didn't test it before writing this comment.
| font-size: 0.9em; | ||
| background-color: $gray-100; | ||
| border-radius: 2px; | ||
| white-space: nowrap; // tags shouldn't go over two lines. |
|
@javierarce I think some of the misalignment here looks less than optimal... |
Oh, true :/ And it looks worse when the page is surrounded by more items. I'd suggest getting rid of the icon. We could try to find a different way to highlight that particular item, but as a first step, I think we could just rely on the tag (which, now that I think about it, I think shouldn't be capitalized). |
Yeh it's a shame because felt the icon was doing a good job of highlighting it. But yes we can use Let's iterate. I need a 👍 from a tech review next because this PR touches editor settings and that's liable to introduce perf regressions. |
39eb4bd to
50b8c0b
Compare
|
@javierarce I removed the icon and made the tag lowercase. |
javierarce
left a comment
There was a problem hiding this comment.
Checked this PR again and works fine 🚀
|
Seeking a Technical review here now. |




Description
This PR scratches a personal itch.
When searching for a page using the Link UI it is not always clear which one of the results is your "Home" page (i.e. the one set as "Front page" in WPAdmin
Settings -> Reading.This PR updates the UI to
Front pageon that search result.This makes it a lot easier to see when you have the correct page. The primary use case is when your page is called
Homeand you search for "Home" - it's now a lot clearer that you are about to set the correct page.How has this been tested?
Home.Make me one please.Settings -> Reading.Homepage to be the Front page.Make me one pleasepage as the front page.Screenshots
Types of changes
Checklist:
*.native.jsfiles for terms that need renaming or removal).