feat(app-start): Move start type selector to top of page#65289
Conversation
| <DatePageFilter /> | ||
| </PageFilterBar> | ||
| <HeaderContainer> | ||
| <ControlsContainer> |
There was a problem hiding this comment.
This diff is a result of shifting around the closing tags that had more children than was intended
gggritso
left a comment
There was a problem hiding this comment.
👌🏻 a couple of suggestions, but makes sense overall. The fixes are worth it IMO, but doesn't have to be in this PR.
| // This hook should only run once to set the default type | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps |
There was a problem hiding this comment.
🤔 what if someone manually removes the start type? Would it be safer to add value as a dep, remove the eslint disable, and run the hook whenever the value is missing, rather than just on the first run?
There was a problem hiding this comment.
Aside: it's a little risky for simpler components like selectors to do this kind of redirecting on mount, it can cause wacky URL thrashing for one thing. e.g., if this component mounts late, after a lot of the page already rendered, it'll cause a redirect and the screen will flash. It's a lot tidier to do this kind of thing somewhere higher and closer to the routing. Maybe the screen summary component?
There was a problem hiding this comment.
Great points! I'll address your comments in another PR. I just have a few chained PRs and they make some changes that would conflict with your suggestions so I'll get it in after those happen. Thanks George
Moves the Start Type selector to the top of the page. The filter has not yet been applied to the widgets at the top of the page yet, but the span operation table and the event samples tables have been updated to remove the columns that call out start type.
A follow up PR will come to modify and apply the filter to the other widgets