You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
related issue: #8531
related pr for Ark: posit-dev/ark#873
I'm not exactly sure of the flow of these PRs with Ark, but I believe
we'll want to merge that PR, release Ark, and then pick up the new
release in this PR before this PR is merged.
This PR implements makes 3 major changes to the comms:
- **add `convert_to_code` as a supported feature:** there are other
supported features, such as row filters and column filters. This
structure includes if it is supported as well as supported syntaxes, as
an array of values.
- **`suggest_code_syntax` message:** for a particular data explorer
instance, decide what options a user has for generating code. I would
expect the return value of this to be `base-r` or something to that
effect.
- **`convert_to_code` message:** for a particular data explorer
instance, this message sends over the filters and sorts applied to the
data and the desired syntax. The expectation is that this will return a
code snippet string. The front end will (eventually) apply code
highlighting and formatting.
Below is a diagram of the general flow through comms. Note that these
comm messages will not call each other; they will be triggered by a
modal in Positron core.
```mermaid
flowchart TD
A["Data explorer instance is created"] --> B["Get all potential syntaxes from language pack via the **supported_features**." ]
B --> C["Also set suggested syntax with **suggest_code_syntax**"]
C --> D[Open modal]
D --> E["Use **dataExplorerInstance.suggestedSyntax**"]
E --> F["Translate data view (filters, sorts) to code with **_translate_to_code_**"]
F --> G[Display code for user to copy]
G -->|user chooses another syntax from modal dropdown| F
```
There is an open PR that builds off this branch to use these comms, so
you can actually fire them off/interact with them #8537
### Release Notes
<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
The note will automatically be tagged with the language.
These notes are typically filled by the Positron team. If you are an
external
contributor, you may ignore this section.
-->
#### New Features
- N/A
#### Bug Fixes
- N/A
### QA Notes
It doesn't look like we have much testing for comms, but open to ideas!
Currently I plan on adding unit tests on each language runtime and then
e2e tests for the UI pieces.
---------
Signed-off-by: Isabel Zimmerman <54685329+isabelizimm@users.noreply.github.com>
Co-authored-by: Jennifer (Jenny) Bryan <jenny.f.bryan@gmail.com>
0 commit comments