Svelte: make search header primary#62991
Conversation
8c63f17 to
2c75cc3
Compare
There was a problem hiding this comment.
This is to avoid conflicting with the z-index of the search input.
There was a problem hiding this comment.
I think in a follow up PR we should add a "hover container" to the end of the document, give that element z-index: 1 and portal all hover-like elements (tooltips, popovers, etc) into that container.
We are already portalling them to the end of the document but because the search input needs a higher z-index it will still be rendered on top of them.
There was a problem hiding this comment.
Moved the bottom border to the Tabs component so the TabsHeader component can be used separately.
There was a problem hiding this comment.
I added this function because I couldn't get the existing ones to do what I wanted. overflow isn't enough because I need more than a "small" and "large" state, and computeFit doesn't work in this case because the list of elements is not statically known. I think this is strictly more general than both of those with the tradeoff that changes need to be committed to the DOM with tick before we can re-measure, which I think means there is a possibility of flashing. I was unable to observe any flashing though, so maybe there is another layer of batching happening somewhere.
Anyways, this is probably the piece that could use the closest review
There was a problem hiding this comment.
This seems fine to me, especially since it avoids the limitations of computeFit, though I don't understand
computeFitdoesn't work in this case because the list of elements is not statically known.
It seems you are essentially doing the same as before. Why is the list of elements (the menu entries) not statically known?
There was a problem hiding this comment.
"statically known" was a lazy reason. In reality, it was mostly an issue with TabsHeader having its own wrapper, so we would need to add functionality to TabsHeader to apply the action. I got this mostly working, but it would not work more generally, such as if we have two different elements that can shrink (like in the file header where both the file name and the actions will be shrinkable). So it's a bit forward-looking as well as not wanting to expand the TabsHeader interface.
There was a problem hiding this comment.
This seems fine to me, especially since it avoids the limitations of computeFit, though I don't understand
computeFitdoesn't work in this case because the list of elements is not statically known.
It seems you are essentially doing the same as before. Why is the list of elements (the menu entries) not statically known?
There was a problem hiding this comment.
I think in a follow up PR we should add a "hover container" to the end of the document, give that element z-index: 1 and portal all hover-like elements (tooltips, popovers, etc) into that container.
We are already portalling them to the end of the document but because the search input needs a higher z-index it will still be rendered on top of them.
1fea231 to
b933175
Compare
5e9d2ca to
2606166
Compare
|
Fixed this up to incorporate @vovakulikov's recent changes, and this should be ready for review again |
2606166 to
3e33b09
Compare
3e33b09 to
76e5e63
Compare
fff755c to
e5187bd
Compare
This implements the change to move the search bar back into the header, and the repo header down a level. Comments inline.
Completes SRCH-456
Test plan
Updated relevant playwright tests.
Video overview