Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Code Insights: Add insight export data UI#46694

Merged
vovakulikov merged 8 commits into
mainfrom
vk/add-export-ui
Jan 24, 2023
Merged

Code Insights: Add insight export data UI#46694
vovakulikov merged 8 commits into
mainfrom
vk/add-export-ui

Conversation

@vovakulikov

@vovakulikov vovakulikov commented Jan 20, 2023

Copy link
Copy Markdown
Contributor

Closes https://github.com/sourcegraph/sourcegraph/issues/46493

This PR adds export data UI, (link in the three dot context menu and button on the standalone insight page) This PR should be merged after the BE link implementation is merged.

Test plan

  • Open the three dot context menu and export the data
  • It should be available for all insights except lang stats
  • Go to the standalone insight page (click insight card title)
  • Try to export data with header export data button

App preview:

Check out the client app preview documentation to learn more.

@vovakulikov vovakulikov self-assigned this Jan 20, 2023
@cla-bot cla-bot Bot added the cla-signed label Jan 20, 2023
@sg-e2e-regression-test-bob

sg-e2e-regression-test-bob commented Jan 20, 2023

Copy link
Copy Markdown

Bundle size report 📦

Initial size Total size Async size Modules
0.00% (0.00 kb) 0.01% (+1.50 kb) 0.01% (+1.50 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 877cc99 and 02c985e or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@leonore leonore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll give an approval once I've tested this with the backend landed but thank you for working on this so quickly!!

…onents/actions/CodeInsightIndependentPageActions.tsx

Co-authored-by: leo <leo.p@sourcegraph.com>

@leonore leonore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

landed the BE part so tested it a little. see commit suggestions for functional fixes
1- do you know why from the webapp the url routes to the repository page rather than the internal API endpoint?
i.e. https://sourcegraph.test:3443/.api/insights/export/aW5zaWdodF92aWV3OiIyR2Q0Y1RwbzdLb2d5aGkzMUNuQTQ3amRFZG4i -> repo:^\.api/insights/export/aW5zaWdodF92aWV3OiIyR2Q0Y1RwbzdLb2d5aGkzMUNuQTQ3amRFZG4i$ search

2- is there a reason we don't allow the "Export data as CSV" option from the 3-dot menu?
3- I couldn't see the information pop up from the single insight page, it just linked straight to the API link.

Comment thread client/web/src/enterprise/insights/components/modals/ExportInsightDataModal.tsx Outdated
Comment thread client/web/src/enterprise/insights/components/modals/ExportInsightDataModal.tsx Outdated
@vovakulikov

Copy link
Copy Markdown
Contributor Author

Thanks for checking @leonore

  1. do you know why from the webapp the url routes to the repository page rather than the internal API endpoint? I think there was a problem that I used link without download attribute and client routing use it as absolute path to redirect you to the repository page. It should be fixed now.

  2. is there a reason we don't allow the "Export data as CSV" option from the 3-dot menu? Again my mistake, I fixed the rendering check

  3. I couldn't see the information pop up from the single insight page, it just linked straight to the API link. This one was done intentionally actually :) I think on the dashboard page it's okay to have intermediate step but on the single insight page instead of big loud modal we could use humble and quite tooltip that says the same thing as modal but doesn't introduce additional click.

Screenshot 2023-01-23 at 19 34 40

vovakulikov and others added 2 commits January 23, 2023 20:54
…onents/actions/CodeInsightIndependentPageActions.tsx

Co-authored-by: Chris Warwick <christopher.warwick@sourcegraph.com>
@vovakulikov vovakulikov merged commit a1d648e into main Jan 24, 2023
@vovakulikov vovakulikov deleted the vk/add-export-ui branch January 24, 2023 01:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

insights: frontend for exporting code insights data

4 participants