-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Deeplinking to Releases Drawer List (Global Drawer) #88560
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
Comments
Routing to @getsentry/product-owners-releases for triage ⏲️ |
Wow, this is really hard! I'm trying to tease apart all the factors here by working backwards from what I think a good future is. Firstly, I think we want IDs in the URL, rather than parameters for the panel chart. I think we want to avoid having users deal with long URLs, potentially getting them wrong, potentially creating impossible charts, etc. With IDs we can store configurations in the code, which will let us update those configurations, make sure that the graph on the page always matches the panel, etc. Supporting argument 1: Having an ID per chart is probably good for us. That would let us store chart legend selection in Supporting argument 2: Having an ID per chart is how Dashboards work. If/when we introduce release panels in Dashboards, those charts will get their configs from the widget rather than the URL, otherwise someone might change a widget and then a link to the widget's releases would have a bad, old configuration. Supporting argument 3: Configurable Release Health charts are using this kind of approach already, assigning unique names to chart components, so they can be moved around the page. Charts like having IDs! Counter-argument 1: parameters in the URL are more flexible, and probably simpler. Each chart only needs to store a few parameters in the URL ( Counter-argument 2: The date bounds of the release for the panel have to be in the URL, so there's going to be at least some URL serialization anyway Secondly, I think we want each chart to be independent of the main page. I think. Coordinating the rendering and/or the data loading with the main page seems like it's be really hard? You tell me. A good end result here would be that the chart in the panel loads fast, independently of the page, and I'm still stuck on having it load a higher data resolution than the main page. This'll probably be a lot of work. Supporting argument 1: There is some appetite for having charts load their own data, and some charts already do (all the new Release Health charts, some of the landing page charts). When charts load their own data, it usually improves perceived performance if some charts are able to load faster than others. Counter-argument 1: It'll be for real a lot of work to do this, and probably with some strange gotchas. Counter-argument 2: Supporting multiple chart types will be annoying for sure. That said, we're working hard to reduce the number of chart types, and are making headway, so maybe this won't be that bad? |
I did two quick PoCs (#89045 and #88864) - and the former is what we will be doing. It's cleaner and has some small benefits with existing usage of the widgets, but mostly we want the flexibility in the future for deeplinking directly to widgets. Next steps:
|
…> Http pages As part of an effort to be able to [deeplink to charts via the Releases Drawer](#88560), we need to move data fetching + chart rendering into a self-contained component (with a unique id). This refactors the widgets on `httpLandingPage` and `httpDomainSummaryPage` so that we get an idea of what this will look like.
…> Http pages (#89325) As part of an effort to be able to [deeplink to charts via the Releases Drawer](#88560), we need to move data fetching + chart rendering into a self-contained component (with a unique id). This refactors the widgets on `httpLandingPage` and `httpDomainSummaryPage` so that we get an idea of what this will look like before continuing on to do others.
…89455) Inside of the Releases Drawers, we are only viewing a smaller slice of time than the main PageFilters. The chart widgets and their hooks need to support a pageFilters override. I think env/projects should be the same, but I think it will be more consistent to pass around the full pageFilters object. `showReleaseAs` is also needed since we currently show lines inside of the drawer, and bubbles outside of it. Need as part of #88560
Move into its own component and parse location query itself Part of #88560
… widgets Part of #88560 Closes REPLAY-90'
Move into its own component and parse location query itself Part of #88560 --------- Co-authored-by: George Gritsouk <989898+gggritso@users.noreply.github.com>
Refactors the Insights -> LLM charts to better support deep linking in a future PR. Notable in this PR is the introduction of a `chartProperties` prop for `LoadableChartWidgetProps`. These are to be used as URL query params when linking to the Releases Drawer, but also used to render the chart as well. They are chart-specific, which is the reason for the additional level of object nesting. Part of #88560
Refactors the Insights -> LLM charts to better support deep linking in a future PR. Notable in this PR is the introduction of a `chartProperties` prop for `LoadableChartWidgetProps`. These are to be used as URL query params when linking to the Releases Drawer, but also used to render the chart as well. They are chart-specific, which is the reason for the additional level of object nesting. Part of #88560
…> Http pages (#89325) As part of an effort to be able to [deeplink to charts via the Releases Drawer](#88560), we need to move data fetching + chart rendering into a self-contained component (with a unique id). This refactors the widgets on `httpLandingPage` and `httpDomainSummaryPage` so that we get an idea of what this will look like before continuing on to do others.
…89455) Inside of the Releases Drawers, we are only viewing a smaller slice of time than the main PageFilters. The chart widgets and their hooks need to support a pageFilters override. I think env/projects should be the same, but I think it will be more consistent to pass around the full pageFilters object. `showReleaseAs` is also needed since we currently show lines inside of the drawer, and bubbles outside of it. Need as part of #88560
Move into its own component and parse location query itself Part of #88560 --------- Co-authored-by: George Gritsouk <989898+gggritso@users.noreply.github.com>
This PR creates a "chart widget" similar to what we did for Insights widgets (e.g. #89344). This is so that we can deep-link to the `EventGraph` using only `groupId` from URL parameters. This also makes some changes to `EventGraph` so that we can use a custom date range (/page filters). This is used when we click a release bubble, we want the chart in the drawer to refetch the same stats (but at a different interval) according to the bubble's time bucket. Part of #88560
Refactors the Insights -> LLM charts to better support deep linking in a [future PR](#88562). Notable in this PR is that these widgets are used in 3 different sections: 1) Landing Page - no additional args 2) Details Page - takes a `groupId` from URL parameters 3) "LLM Monitor Section" (group details page) - The wrapping components takes in an `event` argument, which uses the trace (span id + trace id) to query for a groupId to pass to widgets We're going to refactor the 3 widgets into: - ~(3) base widgets that accept an optional `groupId` (referring to AI Pipeline Group, and not our normal Issues Group)~ - (3) widgets that do not require a groupId from URL params. These widgets handle point 1) above - (3) widgets that use `groupId` from URL parameters. These widgets handle points ~1) and~ 2) above. - (2) widgets (`llmEvent*`) that take `groupId` (Issues Group!) and `eventId` from URL parameters to fetch the Issues Group, and then tries to find the AI Pipeline Group id via the event's trace. This AI Pipeline Group ID is then used in the query and renders the appropriate charts. These widgets account for point 3) above. ~In order to handle this[^1] (and for future widgets), this PR introduces a `chartProperties` prop for `LoadableChartWidgetProps`. These are to be used as URL query params when linking to the Releases Drawer, but also used to render the chart as well. They are chart-specific, which is the reason for the additional level of object nesting. Think of it as these two stages:~ ~- "Serialization": we have a chart, and want to "serialize" it into a URL. This will involve 2 steps~ ~- taking the *keys* of `chartProperties` object and using a known query parameter key (e.g. `rdChartPropertyKey`) to create a list of query parameters (e.g. `rdChartPropertyKey=foo&rdChartPropertyKey=bar`)~ ~- turning `chartProperties` into query parameters (e.g. `foo=val1&bar=val2`)~ ~- "Parsing": inverse of "serialization" -- we have a URL and want to render a chart.~ ~- using known key (`rdChartPropertyKey`), we're able to fetch the keys of `chartProperties` (which can vary from chart to chart)~ ~- with the keys, we can again look through the query parameters to get the values for each key~ ~The known key (e.g. `rdChartPropertKey`) acts as an indirect pointer to the `chartProperties` object which has dynamic keys. See [this commit](00d9fd6#diff-0269df2be334787a8238014bd4dae87472c3adf1b5f8021a7a151fc464427c3fR33-R42) for an example.~ Part of #88560 [^1]: There is another solution, since (1) and (2) can be handled without any changes, we would just need slightly diff widgets for (3) where it's mostly the same except it expects `eventId` to available via URL params and it fetches the event to get the trace and then fetches the group id
Uh oh!
There was an error while loading. Please reload this page.
For the new Releases Drawer, we want to be able to deep link into the drawer. There are currently two ways to open up the drawer:
There are also currently two entry points (i.e. the views that contain the charts that will open the drawer) where you can link to/open the global drawer: Insights and Issue Details.
Problem
We need a method to represent a single chart via URL parameters so that we can render the chart inside of the Global Drawer. We currently need to render two (+ possibly more in future) different chart components that take in a variety of props that can be tricky to serialize into URL params.
Potential Solutions
1. Serializing props to URL parameters
For each chart, we could determine the unique parameters it needs to be able to render the chart and use them directly in the URL. This will probably mean a lot of data being saved to the URL. This also might be hard to maintain as we add more charts.
1a. Map props to an ID
Instead of preserving all props in the URL, we could instead give each chart a unique id and use that to map to the props required to render the chart. We would need to refactor our current charts to make sure they render using the same method so that the chart logic does not get desynced.
2. React Context
Views that render a release-enabled chart would need to register a rendering function w/ a release drawer context. We could then pass an id unique to that chart in the URL parameters for the Global Drawer to use for context lookup. This means that the drawer would need to wait for the chart to register/render on the page before it can render in the drawer. It also means that the chart cannot render independently of the page. This isn’t currently a concern, but could be if we wanted to be able to render the releases list outside of clicking on a release bubble.
The text was updated successfully, but these errors were encountered: