Replies: 3 comments 7 replies
-
Thanks for this @m7pr , I have few neutral comments:
x <- dplyr::filter(x, var1 == "a")
x <- dplyr::mutate(x, varx == rnorm(n()))
x <- dplyr::filter(x, var2 == 1)
# instead of (now)
x <- dplyr::filter(x, var1 == "a" & var2 == 1)
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Same applies here #1216 (comment) We can't have shared custom operation module. @m7pr could you add more details to |
Beta Was this translation helpful? Give feedback.
6 replies
-
Closing along with #1216 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This thread is related to #1216, however I started a new discussion as the other one is cluttered and I wanted to present a new approach in this thread.
Table of contents generated with markdown-toc
Intro
To distinguish between all other ideas I will call this approach
operations approach
and will useoperations
term on the actions calledtransformations
in the other approaches. The goal is to create an API, with an idea for UI that will allowteal
applications to utilize custom data transformations within modules. Ideally those transformations should be applied globally or locally (module specific), depending on the user's (app developer) needs. The order of the transformations should also be customizable by the app developer and ideally by app user. API should be straightforward and easy to grasp. Those are the goals I have in mind while presenting the below idea. I also keep in mind that I would like to introduce as least changes as possible (so if we can modify one package vs all of the packages, I'd opt for modifying one package) and would like to reuse as much components as we already have.API
The idea that I present does not affect modules, but introduces new parameter in
teal::init
calledoperations
. Operations takes a list of operations as an input. The order of operations matter. Below you can see possibility tofilter1
)operation2
)operation2
)operation3
)operation3
)By shared I mean that changes on the view of one module are also visible for other modules that share the operation.
UI
We will reuse the space that is currently used by Filter Panel. We will have collapsed chips for every operation that was specified through
operations
list. Chips will be colored respectively to its context for the moduleEach chip (that represents one operation) next to the color, to make it more obvious, will have a label:
shared
(red chip),module specific
(no color chip) andnot used
(grey chip) so it is clear what is the connection of this operation to this module, and what impact the changes to this operation have for other modules.shared
(red chip) operationsno color chip
operationsgrey chip
operationsThere is also an option to hide/show operations not-used in this module. This is hidden by default.
With such specification as below, we are able to control every operation from the UI view of each module.
Operations Manager
The same as currently existing filter manager - it allows to activate or deactivate operations on specific modules. It also has a button to deactivate or activate on all modules. It also enables to copy the operation, that lands as a last operation. Maybe with drag and drop we can then change the order of operations.
Ability to create custom operations through the app
On the RHS of the app, there will be a huge
+
sigh that will allow toFrom every module UI view, you will be able to add new operation or filter. It will land as a last operation on the list.
Creation of operation
During the creation you will be able to specify if this is shared (and with which modules) or not shared. New operations will be just a window where you can put an R code that should work on objects called the same way as
datanames
used in this module. So if 2 datanames are used in this module (e.g. ADSL and ADTTE), the operation will allow to modify those twoWe should inform a user that (s)he is only able to use functions and packages available through session info.
Warnings/errors should be displayed.
We should limit the ability to run
install.packages()
andlibrary()
.Creation of filter
It will just start the new collapsable filter panel. From that moment you can create the filter the same way you normally did before.
What will be removed
teal_slices
is not needed as we only useteal_slice
nowWhat will need to be changed and implemented
teal::init
gets a new parameteroperations
teal_operation
is implemented inteal.transform
operations
parameter might take an object as an input (calledteal_operations
) instead of a list - thisteal_operations
can take parameters for greaterPros and cons
Advantages
teal
and not inmodules
Disadvantages
What to think about
Beta Was this translation helpful? Give feedback.
All reactions