-
Notifications
You must be signed in to change notification settings - Fork 622
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
RFC87: add download_custom_buttons_json to application.properties schema and update documentation #10921
Conversation
- added custom_buttons_json which leverages readFile() - added to EXAMPLE - added avm version to resources/
- application.properties-Reference - added custom_buttons-Reference document
@@ -798,3 +798,10 @@ is on by default but can be disabled using the following property. | |||
//boolean | |||
enable_study_tags=true|false | |||
``` | |||
|
|||
# Add Custom Buttons to data tables | |||
Custom Buttons can be defined which will conditionally appear in all group comparison data tables (with CopyDownloadControls) to launch a custom URL. This can be used, for example, to launch a software application (that is installed on the user's system) with the data. This configuration can also customize new elements on the Visualize page. It points to a JSON file on the classpath. (See [custom_buttons reference](/deployment/customization/custom_buttons-Reference.md)). |
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.
I noticed an inconsistency. When you are viewing the documentation directly in github, these links (to /deployment) don't work, because the documents actually are under "/docs/deployment/....". Example,
- https://github.com/cBioPortal/cbioportal/blob/master/docs/deployment/customization/application.properties-Reference.md is the correct URL
- https://github.com/cBioPortal/cbioportal/blob/master/deployment/customization/application.properties-Reference.md is where cross-links try to go (giving a 404 error)
When you view the documentation under "docs.cbioportal.org" the links work, because /docs/ is the root and does not appear in the URL path at all. Example,
This also means that if you change the link to "/docs/deployment/..." then it will work in the first scenario, but not in the live scenario.
Not sure how to fix. It makes it difficult to test the documentation cross-linking prior to it actually going live.
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.
Would always using relative URLs solve the issue (e.g. ./../deployment/
)?
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.
Yes, I can confirm that works when viewing document in github. I can't verify that it works under docs.cbioportal.org but it should. I'll submit a new PR that updates the links in this file to be relative
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.
Thanks @pappde !
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.
added PR #10938 to address this file and a few others.
src/main/java/org/cbioportal/service/FrontendPropertiesServiceImpl.java
Outdated
Show resolved
Hide resolved
"visualize_description": "Windows software that loads data into 3D Landscapes for interactive visualization and pathway analysis. Download table data directly from cBioPortal.", | ||
"visualize_image_src": "https://github.com/user-attachments/assets/5c17f5ed-0357-4ffa-a6e1-5a9d435dd3c5" | ||
} | ||
] |
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.
Included in the "resources" folder so it can be easily enabled with one line (per the EXAMPLE)
If they can appear anywhere that the download controls component is used,
then download_custom_buttons_json
…On Thu, Aug 1, 2024 at 5:22 PM Denis Papp ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In docs/deployment/customization/custom_buttons-Reference.md
<#10921 (comment)>
:
> @@ -0,0 +1,72 @@
+# Custom Buttons for Data Tables
Ok, as to exactly what name: technically, it may appear anywhere that the
CopyDownloadControls appear (with ShowDownload==true). I couldn't find an
official name for the tables where these controls appear in this context,
so I have been calling them "group comparison", but realize it could be a
misnomer. In the RFC, we also used the term "LazyMobX tables", but that
doesn't seem right either.
@alisman <https://github.com/alisman> preference?
A) download_custom_buttons_json
B) group_comparison_custom_buttons_json
C) data_custom_buttons_json
—
Reply to this email directly, view it on GitHub
<#10921 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABNRGIOWSCWHW7G3CX3OWLZPKRKXAVCNFSM6AAAAABL3IE672VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMJUGAYTQNBSGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
- updated links - renamed documentation file - updated app.properties section name and cross-links - renamed resource fie - renamed resource folder to use underscore instead of dash to be consistent with property
Renamed property to download_custom_buttons_json |
Summary
This is the backend update for frontend PR cBioPortal/cbioportal-frontend#4938. This PR addresses the backend configuration requirement for RFC87, which involves defining JSON to customize the frontend to display custom buttons for data tables.
This PR includes documentation for how to define your own custom button, and also includes the AVM configuration for RFC87.
Enabling Custom Buttons
By default, there are no custom buttons defined. The following can be added to an instance's application.properties to enable it:
Changes
Code
Documentation
Resources
Notify reviewers
@alisman @jjgao