-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: setup system for TLG (plots) #124
base: main
Are you sure you want to change the base?
Conversation
Hello @m-kolomanski the idea seems amazing, pretty much what we talked and the yaml provides more flexibility. Only thing I am wondering is that the yaml file should also specify for each option if the input should be text, numeric, choice... And in case it is for example a selectInput multiple-choice we will need to connect it to the dataset and specify multiple=TRUE. Are you thinking in:
On the other hand, I am not sure if you should/could already have in mind how the app will make the UI distribution of the inputs. We would like that all inputs regarding for example labs (title, xlab, ylab) are located together at a different section to other type of inputs. Although I guess that this will make more sense to predefine it in the app instead of the yaml, as it should be static |
Hello @m-kolomanski , I see that this is starting to look really cool! I will also ask for feedback from Valentin on this, but I will give you some points regarding my perspective that I noticed:
Let us know if you agree with everything stated and with the feature developed so far @Shaakon35 |
Hello @m-kolomanski @Gero1999
I think we are close to what we need now already, thanks a lot for all the work! Best |
@Gero1999 @Shaakon35 I have one question regarding the number of plots per page, do we want to keep the pagination at all? Or do we just want to display all plots on single page and scroll through them? Do we want similar pagination abilities to the slope selector? What would be the best solution? |
Good point. I am actually thinking that maybe all plots at once would be better. An alternative idea could be to have some selection controls like in slope plots so the user can make edition on the set of plots they choose by selectInputs or similar (i.e, change the footnote of all plots with the X analyte). But maybe the idea is too crazy, let me know what you both think! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall idea with YAML configuration is a great direction in my opinion, @m-kolomanski. Good work on that. I left a few comments here and there.
However, I think that the current state of the app is crashing - see the recording.
CleanShot.2024-11-29.at.09.56.41.mp4
Regarding the pagination, my idea is first to wrap up this first graph. I don't think we need any pagination in the TLG tab, we can just click next, and that should be enough. Then, we will think about pagination in a PDF for the plots: The idea is to have 1 plot per page on the pdf. I have seen that you created two new buttons for X-axis and Y-axis, I think we should not let the user configure the plot too much as it will complicate the bug fixing of errors. I think we should make it simple for now. |
@Gero1999 @Shaakon35 I aggree with Valentin, wrapping this up should be the priority. I am gonna make some finishing touches to implement a working, smooth basic system, and then we can expand on it as we add new plots and the need arises. I will let you know when I am satisfied and call for a review - mostly to know if the amount of capabilities is acceptable. Could you please provide me with comprehensive list of what arguments should be customizable for the first plot, along with what type of input it should be and what kind of choices ideally the user should be able to make? |
Hello @m-kolomanski , I just noticed one bug for the log10 scale:
We used to have the following code.
Can we reuse part of the function? I have tried to use it on the object plotly_plot, but it's not a ggplot object and I struggled. |
Hi @Shaakon35,
|
I would also reconsider the need for |
Hi @m-kolomanski @Gero1999 Thanks a lot, all good for me. |
@Shaakon35 I do not mind either way, both approaches have pros and cons, I just wanna confirm we are reasonably happy with the choice. |
Hi @m-kolomanski , I've looked into the busy indication. Unfortunately, shiny's busyIndicator simply doesn't work with the uiOutput, and it's not clear if it will work in the near future (I went through the discussions, and apparently only a change for tableOutput is in the making). I'm afraid that the only way to solve this would be to use Also, while testing, I noticed that the plots are rendered twice, thus doubling the overall loading time. And also, if I "submit order details" second time, there are no plots visible on the screen. |
@Gotfrid If inbuild functionalities fail, I see no issue with using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This work is so big that it probably deserves its own package. I was able to follow the instructions and create my own plot without any problems.
I left a few comments, but I wouldn't consider any of them blocking.
There is one problem that I found: following the test instructions, i was able to see all the plots and then i started configuring them. as a user, I select x-axis to be studyid
and the app crashes.
Also, I'm not sure how x and y axes limits are supposed to work. I entered some values, but the don't seem to have any effect. Probably another ggplot -> plotly problem.
Indeed @m-kolomanski great work! I can imagine this has taken a lot, but the results are very very impressive. Just to go part by part:
|
Co-authored-by: Pavel Demin <[email protected]>
Issue
Closes #53
Description
tlg_plot
module responsible for displaying plots and creating widgets for plot option customizations, which are then dynamically passed to rendering functions.tlg.yaml
file which allows specification of TLG metadata (descriptions, links etc) for compact table display, as well as rendering function and TLG options which are then displayed as shiny widgets and editable.pkcg01
plot as an example of system implementation.Definition of Done
plotly
for interactivityHow to test
For basic testing, run the app and Submit mapping in the Mapping and filters tab. Then you can go to TLG tab and Submit order two default plots. When the plots are rendered, you can test changing the values in the widgets.\
For more advanced testing, please do try to add a new plot. The details are described in
.github/contributing/add-tlg.md
. Please check if the documentation is clear and complete. Adding a new plot will require writing a definition in thetlg.yaml
file and providing a generating function, which could render a very basic plot.Contributor checklist
Notes to reviewer
Please do review not only the code and functionalities, but also the documentation closely. If anything is confusing, missing or could be explained better - please do let me know. We want the system to be usable by contributors without the need of an introduction on a call.