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

notebooks: remove elm compute component #45360

Merged
merged 6 commits into from
Dec 7, 2022

Conversation

limitedmage
Copy link
Contributor

@limitedmage limitedmage commented Dec 7, 2022

This removes all code related with the Notebook compute component, including the backend API, Elm build, etc.

Test plan

  • An existing notebook with a compute block should still load (without rendering that block)
  • Editing that existing notebook should save the notebook without the compute block

@cla-bot cla-bot bot added the cla-signed label Dec 7, 2022
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Dec 7, 2022

Codenotify: Notifying subscribers in CODENOTIFY files for diff b9a2844...972a261.

Notify File(s)
@fkling client/web/src/search/results/components/compute/Makefile
client/web/src/search/results/components/compute/README.md
client/web/src/search/results/components/compute/elm.d.ts
client/web/src/search/results/components/compute/elm.json
client/web/src/search/results/components/compute/index.html
client/web/src/search/results/components/compute/public/js/ports.js
client/web/src/search/results/components/compute/src/Main.elm

@limitedmage limitedmage requested review from rvantonder, novoselrok and a team December 7, 2022 18:26
Copy link
Member

@eseliger eseliger left a comment

Choose a reason for hiding this comment

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

looks like some previously ignored files snuck into the diff!
Screenshot 2022-12-07 at 19 31 00@2x

@@ -6,8 +6,7 @@ func validateNotebookBlock(block NotebookBlock) error {
if block.Type != NotebookQueryBlockType &&
block.Type != NotebookMarkdownBlockType &&
block.Type != NotebookFileBlockType &&
block.Type != NotebookSymbolBlockType &&
Copy link
Member

Choose a reason for hiding this comment

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

what do we do about existing notebooks with these blocks? Would they fail to save?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed backend.ts to delete any invalid blocks before saving.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I debated where to do this (backend? frontend? on fetch? on save?) and decided this was the easiest way.

Copy link
Member

Choose a reason for hiding this comment

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

works for me as long as nothing breaks - doesn't sound like it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's working for me at least from what I've tested (test cases in the description above)

@limitedmage
Copy link
Contributor Author

looks like some previously ignored files snuck into the diff!

Good catch, thanks! This is because I removed the .gitignore rule but didn't delete the previously-ignored files 🤦‍♀️

Copy link
Contributor

@rvantonder rvantonder left a comment

Choose a reason for hiding this comment

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

thanks! you got to this before I did 😆

@limitedmage limitedmage merged commit 28e8c76 into main Dec 7, 2022
@limitedmage limitedmage deleted the main-dry-run/jp/removeelmcompute branch December 7, 2022 20:59
@valerybugakov
Copy link
Member

Nice, thank you @limitedmage!

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.

5 participants