Skip to content

Instantly share code, notes, and snippets.

@bollwyvl
Created October 15, 2014 19:29
Show Gist options
  • Save bollwyvl/2477d23debbe688f7dbe to your computer and use it in GitHub Desktop.
Save bollwyvl/2477d23debbe688f7dbe to your computer and use it in GitHub Desktop.
IPython Notebook Search Features

existing productive search interfaces:

  • sublime text/textmate
    • replacement preview
  • notepad++
    • mark multiple searched values
  • Word
    • contextual navigator interface:
      • hits with context
      • page preview
      • header-level outline
    • "where to search" choices
      • input cells
      • output cells
        • widgets
      • cell/notebook metadata properties
  • browsers

screen real estate: (especially mobile)

  • top, right, (i.e. covering kernel picker): chrome
  • bottom, full width: ff, atom, sublime
  • top, full width: ie
  • left, full-height: word
  • popup: n++ (though find all results docked to bottom)

features:

  • find (next/previous)
    • basically what the browsers currently show
      • per-keystroke search/highlight
  • find all
    • show navigable table of hits
  • replace
    • show contextual preview of replace
      • inline is probably too hard
    • for cells, replace and run?
  • undo
    • undo all
  • usual search settings
    • regular expressions
      • will have to be JS regexen, probably...
    • match case
  • search context(s)
    • cells
      • input
      • outputs
        • widgets
    • metadata
      • cell
      • notebook
  • grep (hide
  • search/replace string history
    • where to store?
      • notebook meta
      • localstorage

frontend integration:

  • ScrollManager (unless this can be hidden in IPython.events)
    • .scroll_to
  • widgets
    • event based?
    • base widget just searches the text of the DOM
      • obviously won't find things in canvas nodes, or in un-displayed data
    • custom widget implementer either offers up
      • values to be searched
        • includes metadata on how to scroll to that hit: i.e.:
          • scroll to the widget
          • then reveal and focus on a particular node
      • implements its own search
        • potentially allows for searching stuff back in the kernel
    • publish event that requests a search of the notebook for a particular value

backend integration

  • search across many notebooks
  • widgets implement custom search
    • think paged data not yet displayed on front-end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment