Skip to content
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

Overview/list of all mis-spelt words in the notebook/script #68

Open
krassowski opened this issue Apr 13, 2021 · 5 comments
Open

Overview/list of all mis-spelt words in the notebook/script #68

krassowski opened this issue Apr 13, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@krassowski
Copy link
Collaborator

Sometimes I have long notebooks that I created a while ago. When I go back I sometimes spot errors, but it requires me to enter the markdown cell to see those. I would like to be able to see a summary of mis-spelt words somewhere to be able to navigate to those easily.

Design ideas:

  • something like the diagnostics panel from jupyterlab-lsp:
    • + intuitive, easy to navigate
    • - takes up space, the action of spellchecking entire notebook would be likely performed only once, not continuously as it happens with diagnostics
  • "list all typos" dialog window:
    • + only shows up when needed
    • - needs to be opened after fixing each typo, unless is complex enough that it can handle correction from the dialog, but might not be worth the effort
  • "list of typos" sidebar item:
    • could potentially be dismissible, as is the sidecar (extension)
    • + would not take too much space when not in use

The listing would ideally include:

  • the misspelt-word,
  • context (fragment of the sentence, e.g. +/-5 tokens from markdown cell)
  • an interaction allowing to scroll to appropriate place in the notebook/editor
  • a way to immediately choose a fix suggestion if available
  • a way to add the typo to ignored
@krassowski krassowski added the enhancement New feature or request label Apr 13, 2021
@ocordes
Copy link
Collaborator

ocordes commented Apr 16, 2021

I fully agree, I have the same problem with the notebooks. Your solutions are well listed, but at the beginning, if we spot a misspelt word in the notebook, in your case the markdown cell is not in edit mode. Can we update the cell without open the cell for rerendering? I mean if we can do this, then I think a solution should be to have something like an interactive task which checks the notebook completely and then ask if a misspelt word should be changed or not like a normal text editor? I totally agree that the context is necessary and should be editable as well ;-)

@krassowski
Copy link
Collaborator Author

krassowski commented Apr 16, 2021

Good points.

in your case the markdown cell is not in edit mode. Can we update the cell without open the cell for rerendering?

the search & replace function in JupyterLab silently switches all Markdown cells to edit mode when it analyses notebook, and then keeps cells with matches in the edit mode. We could do the same in the interactive spellchecking task. Edit: to directly answer the question, yes I believe that we can also modify the cells whether they are in editing or rendering mode.

Another idea would be to modify markdown renderer to make it to highlight typos; I do not know how feasible it is, but I would like to be able to see these without entering the cell indeed.

@ocordes
Copy link
Collaborator

ocordes commented Apr 16, 2021

Oh, I never tested the search & replace function but this looks similar what I think one can use for the interactive spellchecking task. Highlighting typos in rendered cells sounds good, but for myself when I use a notebook during a lecture I don't want to have a highlight in the cell. I mean highlighting typos are good, but sometimes I have words which are spelled correctly but are not in the word list. Then the mark is somewhat annoying ...

@krassowski
Copy link
Collaborator Author

Highlighting typos in rendered cells sounds good, but for myself when I use a notebook during a lecture I don't want to have a highlight in the cell. I mean highlighting typos are good, but sometimes I have words which are spelled correctly but are not in the word list. Then the mark is somewhat annoying ...

I agree, if such functionality gets introduced it should be optional. We could also take care to turn it off in the presenter mode.

@krassowski
Copy link
Collaborator Author

As for the sidebar option and providing the context, I implemented something similar in jupyterlab-citation-manager extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants