You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.9 KiB

2 years ago
  1. ## Gooey 1.0.6 Released!
  2. This is a minor release beefing up the new FilterableDropdown's search capabilities and performance. In the previous release, the dropdown was backed by WX's `ListBox` widget. 1.0.6 replaces this for a fully virtualized version which allows Gooey to operate on massive datasets without taking a hit to UI performance. Additionally, how Gooey internally filters for matches has also been updated. Choice are now backed by a trie for super fast lookup even against large data sets. Tokenization and match strategies can be customized to support just about any lookup style.
  3. Head over to the [Examples Repo](https://github.com/chriskiehl/GooeyExamples) to see the updated demo which now uses a dataset consisting of about 25k unique items.
  4. **New Gooey Options:**
  5. `FilterableDropdown` now takes a `search_strategy` in its `gooey_options`.
  6. ```python
  7. from gooey import Gooey, GooeyParser, PrefixTokenizers
  8. gooey_options={
  9. 'label_color': (255, 100, 100),
  10. 'placeholder': 'Start typing to view suggestions',
  11. 'search_strategy': {
  12. 'type': 'PrefixFilter',
  13. 'choice_tokenizer': PrefixTokenizers.ENTIRE_PHRASE,
  14. 'input_tokenizer': PrefixTokenizers.REGEX('\s'),
  15. 'ignore_case': True,
  16. 'operator': 'AND',
  17. 'index_suffix': False
  18. }
  19. })
  20. ```
  21. This gives control over how the choices and user input get tokenized, as well as how those tokenized matches get treated (ANDed together vs ORd). Want to match on any part of any word? Enable the `index_suffix` option to index all of your candidate words by their individual parts. e.g.
  22. ```
  23. Word: 'Banana'
  24. Suffixes: ['Banana', 'anana', 'nana', 'ana']
  25. ```
  26. These all get loaded into a trie for super fast lookup. Combine this with the `WORDs` tokenizer, and you get really fine grained search though your options!
  27. ## Thank you to the current Patreon supporters!
  28. * Qteal
  29. * Joseph Rhodes
  30. ## Breaking Changes
  31. No breaking changes from 1.0.5.