fix: improve bitmap field editor styles for large images and/or no buttons #2360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

The basics
The details
Resolves
Fixes #2351 (review)
Proposed Changes
Reason for Changes
While testing a recent update to the bitmap field plugin (#2351), it was noticed that dropdown content is cut off for large images.
This bug is unrelated to the recent update, and is due instead to a max height set in Core for all Blockly dropdowns: https://github.com/google/blockly/blob/049993405e23cf4bf05943eb0d5070116715db2c/core/css.ts#L127
While doing this, I also noticed an existing 20px bottom margin, which seemed undesirable if there were no buttons:


Because buttons were always present before the most recent update, this bug is directly related to that work.
The results of the changes here are that the editor no longer has a maximum height, and there is equal padding on all sides when no buttons are shown:

The obvious drawback to proposed solution is that block designers will need to be especially careful not to provide blocks with images that are overly large for their users' devices and screen resolution. Alternative solutions could be to dynamically resize the editor content or to keep a (potentially adjusted) maximum height and live with the scroll bar. I didn't pursue either of those options at this time.
Test Coverage
No changes to test coverage are included.
Documentation
No changes to documentation are needed.
Additional Information
N/A