Skip to content
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

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

pappde
Copy link
Contributor

@pappde pappde commented Aug 1, 2024

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:

download_custom_buttons_json=classpath:/custom-buttons/download_custom_button_avm.json

Changes

Code

  • FrontendPropertiesServiceImpl.java - updated so that the property is treated as a reference to a JSON

Documentation

  • application.properties.EXAMPLE
  • application.properties-Reference.md: added download_custom_buttons_json and link to new document
  • download_custom_buttons-Reference.md: new document describing how to configure custom JSON

Resources

  • resources/custom_buttons/download_custom_button_avm.json: added, but unreferenced by default

Notify reviewers

@alisman @jjgao

Denis Papp and others added 5 commits July 31, 2024 17:17
- 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)).
Copy link
Contributor Author

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,

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.

Copy link
Member

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/)?

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pappde !

Copy link
Contributor Author

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.

"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"
}
]
Copy link
Contributor Author

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)

@alisman
Copy link
Contributor

alisman commented Aug 2, 2024 via email

@pappde pappde changed the title RFC87: add custom_buttons_json to application.properties schema and update documentation RFC87: add download_custom_buttons_json to application.properties schema and update documentation Aug 2, 2024
Denis Papp added 2 commits August 2, 2024 16:42
- 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
@pappde
Copy link
Contributor Author

pappde commented Aug 2, 2024

Renamed property to download_custom_buttons_json

@alisman alisman merged commit 53d6679 into cBioPortal:master Aug 12, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants