Skip to content
Snippets Groups Projects
  1. Aug 03, 2022
  2. Aug 02, 2022
  3. Jul 29, 2022
  4. May 15, 2022
  5. May 14, 2022
  6. Feb 06, 2022
  7. Aug 29, 2021
  8. Aug 28, 2021
  9. Aug 27, 2021
    • Gabriela Bittencourt's avatar
      f7055ba4
    • Albert Gräf's avatar
      Add some autocomplete options to the gui preferences. · 3440d1d1
      Albert Gräf authored and Gabriela Bittencourt's avatar Gabriela Bittencourt committed
      The autcomplete option globally enables or disables autocompletion.
      
      The autocomplete_prefix option only matches object name prefixes,
      instead of looking for the text anywhere in an object name. So, e.g.,
      typing "me" lists "metro", but not "timer" as possible completions if
      this option is enabled.
      
      Both options are currently disabled by default.
      
      TODO: French translations.
      3440d1d1
    • Gabriela Bittencourt's avatar
      Remove message and comment autocompletion · 533ebff2
      Gabriela Bittencourt authored
      The autocompletion of messages and comments doesn't properly deal with
      line breaks in the current implementation. Disable those for now.
      533ebff2
    • Gabriela Bittencourt's avatar
      Add the autocomplete dropdown feature · 81bdfb62
      Gabriela Bittencourt authored
      This adds a dropdown menu with completions from the completion index
      when the user creates a new object, message or comment, and starts
      typing. Note that this index is initially populated with objects from
      the search index of the help browser. As the user types object names,
      arguments, messages and comments, they will be added to the completion
      index as well.
      
      Entries from the menu can be chosen with the cursor up and down
      keys. The enter key can then be used to select an entry and insert the
      corresponding completion. Alternatively, clicking with the mouse also
      selects an entry.
      
      NOTES / TODO:
      
      This is a very first implementation of autocompletion for purr-data, and
      as such it still has a few minor quirks and shortcomings:
      
      - Help index completions: Completions from the help browser's index will
        only be available once that index has been built. By default, this
        happens when the help browser is first launched. However, you can
        change this so that the help index is automatically created when
        purr-data launches, by ticking the corresponding checkbox in the GUI
        preferences. This will make sure that completions from the help index
        are always available, even before launching the help browser for the
        first time.
      
      - Prefix matches: As shipped, completions will encompass all matches of
        the typed text, even within an index item. There is an option to
        select prefix matches only in the code of the search_obj() function in
        pdgui.js. Currently changing the code is the only way to get this
        behavior; there should probably be a checkbox in the GUI preferences
        to make this easier.
      
      - Tab completion: There is no binding for the Tab key in order to select
        a default completion yet, so currently you have to use the cursor keys
        and enter or the mouse to select a completion. This will hopefully be
        added in the future.
      
      - Stale completions: At present, there is no way to remove "stale"
        completion entries, such as obsolete entries from the help index, or
        manually typed completions which haven't been used for a long
        time. There should probably be a way to do this in a (semi-)automatic
        fashion, but at present the completion engine offers no support for
        this.
      81bdfb62
    • Gabriela Bittencourt's avatar
      Prototype of autocomplete feature · 848a6e5e
      Gabriela Bittencourt authored
      For now the results are shown in the purr-data console,
      printing the first 10 completions.
      848a6e5e
    • Gabriela Bittencourt's avatar
      Create a completion_index for the autocompletion feature · 8dc2b854
      Gabriela Bittencourt authored
      - create the completion_index at the initialization of purr data
      - add newly created objects to the completion_index
      - update the completion_index by adding all objects from the index
        of the help browser whenever the index is created via make_index
      - the completion_index is saved into a json file when purr-data
        quits, and also every 50 changes in order to mitigate data loss
        in case purr-data crashes
      8dc2b854
  10. Aug 26, 2021
    • Albert Gräf's avatar
      Rework the index creation process. · 0e23379b
      Albert Gräf authored
      Pass 1 now iterates over the default hierarchy (either doc or the entire
      libdir) and the help path (if enabled) to determine names and locations
      of all help patches in the scope of the help browser (as set in the GUI
      preferences). This initial pass is needed, in particular, to resolve
      related object references in the meta data in pass 2.
      
      Pass 2 then iterates over all index entries constructed in pass 1,
      adding all the available meta data, including cross references to
      related objects. When pass 2 finishes, index construction is complete
      and the index cache is written to disk.
      
      Note the new revision of the help browser narrows indexing to just the
      -help.pd patches. Previous versions would index all .pd files. This may be
      subject to review, but the new indexing scheme is faster and produces less
      noise in the earch results (i.e., you won't see any helper abstractions or
      other patches which just happen to be bundled with the help patches).
      0e23379b
  11. Aug 25, 2021
    • Gabriela Bittencourt's avatar
      Add link to related_objects to each -help file · 9309710e
      Gabriela Bittencourt authored and Albert Gräf's avatar Albert Gräf committed
      This adds clickable links (employing calls to pdgui.doc_open) to the
      help patches for related objects, if we can locate them. To support
      this, we add an initial scan of the help patches, recording their names
      and paths in the search index so that we can quickly look up their
      locations.
      
      NOTE: At present, the initial scan only covers the default hierarchy in
      libdir, regardless of what the actual scope of the browser set in the
      gui preferences and the help path is. Meta data will only be retrieved
      for the help patches discovered in the initial scan.
      9309710e
    • Gabriela Bittencourt's avatar
      Improved formatting of related objects for better readability · d9e60e22
      Gabriela Bittencourt authored and Albert Gräf's avatar Albert Gräf committed
      d9e60e22
    • Gabriela Bittencourt's avatar
      Add related objects to the help index · 7e601d41
      Gabriela Bittencourt authored and Albert Gräf's avatar Albert Gräf committed
      If an object has a "related objects" field in its help patch meta data,
      then the list of related objects will be added to the help index and
      will be displayed along with its description in the help browser.
      
      Moreover, objects will be listed in the search results if they have the
      search term as a related object. For instance, a search for 'pulse' will
      also list 'metro' because 'metro' has 'pulse' as a related object.
      
      Note that depending on the actual meta data, relatedness isn't
      necessarily symmetric. E.g., 'pulse' doesn't list 'metro' as a related
      object in turn and thus a search for 'metro' will *not* show 'pulse' in
      the search results, even though 'pulse' is related to 'metro'.
      7e601d41
    • Gabriela Bittencourt's avatar
      Bugfix: get rid of elasticlunr's default stop words · 76079f28
      Gabriela Bittencourt authored and Albert Gräf's avatar Albert Gräf committed
      These interfere with incremental search (if an object name happens to be
      a stop word then it won't show in the search results), so we get rid of
      them.
      76079f28
  12. Aug 05, 2021
  13. Jul 28, 2021
  14. Jun 19, 2021
  15. Apr 25, 2021
  16. Apr 24, 2021
  17. Apr 21, 2021
  18. Apr 18, 2021
  19. Apr 17, 2021
  20. Apr 16, 2021
  21. Apr 15, 2021
Loading