Idea: shiny app/function to help identify the theme() command someone is looking for
jonocarroll opened this issue · 8 comments
User enters "rotate" and gets a list of theme()
commands which match. User extends to "rotate x" and the list refines.
isnt that pretty self contained in how element_* are defined as lists with their own docs?
I'm thinking (prototyping) a search where a user enters text and gets suggestions for the full call, not just pointers to docs about element_text()
.
interesting. maybe @jonthegeek would be interested in this. He deals with BERT and that would fit nicely in this type of idea i think.
I have a prototype I'll push to a branch that does an okay job, but yeah - if anyone wants to have a go at doing some language stuff on suggestions then I'm all for it.
Prototype: https://github.com/jonocarroll/howdoi
Features:
- rough text search for
{ggeasy}
and{ggplot2}
commands based on function and arguments (thus better than autocomplete) - includes a set of synonyms, so e.g. "smaller font" will suggest
easy_all_text_size()
andtheme(text=??)
- copy suggestions (selected row)
- direct link to open an issue in (a) repo with pre-populated template
This could still be improved by some NLP, but for now it does an okay job at suggesting calls. Where it doesn't, the issue creator will (hopefully) give some insight into what's not working.
TODO:
- disable various buttons until ready (
shinyjs::disable()
) - make look nicer
- RStudio Addin
- command-line mode (with argument, otherwise launch shiny)
- add namespace prefixes (
ggeasy::
) - integrate into
{ggeasy}
Looks like a good start. I’ll play around with it this weekend.