david-yz-liu / memory-viz

Javascript library for creating beginner-friendly memory model diagrams.
https://www.cs.toronto.edu/~david/memory-viz/demo/
2 stars 7 forks source link

Disable download buttons #87

Closed yoonieaj closed 1 month ago

yoonieaj commented 1 month ago

Proposed Changes

Disable Download JSON and Download SVG buttons when there is no input or output, respectively.

This PR also fixes a bug where pressing the Download JSON button would not download the JSON input currently inside the input box.

...

before these changes, it was possible to have an empty output box and an enabled `Download SVG` button: ![image](https://github.com/user-attachments/assets/2f6c190c-4808-4b43-9372-43bbcad2de6f) after these changes, this should no longer be possible: ![image](https://github.com/user-attachments/assets/26a17a64-3ee7-4067-9e99-b5203a388c04) (similarly for the `Download JSON` button as well.) Screenshots of your changes (if applicable)

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
✨ New feature (non-breaking change that adds functionality)
πŸ› Bug fix (non-breaking change that fixes an issue) X
🎨 User interface change (change to user interface; provide screenshots) X
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests)
πŸ“š Documentation update (change that only updates documentation)
πŸ“¦ Dependency update (change that updates a dependency)
πŸ”§ Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

After opening your pull request:

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 11026316164

Details


Totals Coverage Status
Change from base Build 10973102526: 0.02%
Covered Lines: 406
Relevant Lines: 436

πŸ’› - Coveralls