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

Show markdown in full height #18454

Open
mhdask opened this issue Jan 22, 2025 · 2 comments
Open

Show markdown in full height #18454

mhdask opened this issue Jan 22, 2025 · 2 comments
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement status: revisions needed This issue requires additional information to be actionable type: feature Introduction of new functionality to the application

Comments

@mhdask
Copy link

mhdask commented Jan 22, 2025

NetBox version

v4.1.9

Feature type

Change to existing functionality

Proposed functionality

Markdown presentation was changed in #17237, clamping all rendered markdown to a max height of 200px.
When using markdown to create tables in script logging, this max height is easily exceeded, resulting in clamped tables that you have to scroll through, kind of defeating the purpose of the table in the first place - An easy overview.

Can there be implemented an option, so that you can specify whether the rendered markdown should be clamped in height, e.g. as it was pre #17237?

Use case

Sometimes the full markdown is desired, instead of a clamped version, e.g. for tables creating an overview of something

Database changes

None, as far as I know

External dependencies

None, as far as I know

@mhdask mhdask added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Jan 22, 2025
@bctiemann
Copy link
Contributor

I think this is a good suggestions, but implementation can go any of a few different ways.

One option might be to add another filter similar to render_markdown, e.g. render_markdown_clamped, which appends a different (or additional) class to rendered-markdown which applies the clamping style. This would mean templates would have to be reworked to use the appropriate filters accordingly.

Another way would be to have a button or control on markdown fields to toggle the clamping on and off. With this approach, there's a further question of whether the behavior last requested should be persistent and apply upon reload of the page, or should it be a purely temporary override similar to the bottom-right resize handle on a textarea? And if persistent (i.e. with a cookie or session variable), should it apply to all markdown fields, or just the one directly clicked on?

Or should the option be a global preference that applies to all markdown fields throughout the app?

I'd like to see some further details of what this would ideally look like when implemented.

@bctiemann bctiemann added status: revisions needed This issue requires additional information to be actionable complexity: medium Requires a substantial but not unusual amount of effort to implement and removed status: needs triage This issue is awaiting triage by a maintainer labels Jan 23, 2025
@mhdask
Copy link
Author

mhdask commented Jan 24, 2025

Hmm, for my specific usecase, it should be able to be controlled within the custom script, i.e. when you use the logging (self.log_warning, etc.) you could specify whether the text should be clamped or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement status: revisions needed This issue requires additional information to be actionable type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants