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

File Block: Enable User Customization of Download Button Appearance #68509

Closed
Mayank-Tripathi32 opened this issue Jan 6, 2025 · 4 comments
Closed
Labels
[Block] File Affects the File Block [Type] Enhancement A suggestion for improvement.

Comments

@Mayank-Tripathi32
Copy link
Contributor

What problem does this address?

  1. Current file block uses RichText for the download button which limits styling/functionality
  2. Difficult to customize button appearance and behavior
  3. Inconsistent with WordPress's block system for button handling
Test.File.block.mp4

What is your proposed solution?

Replace the current RichText-based download button with an InnerBlocks implementation that specifically allows the core Button block. This solution leverages WordPress's existing button block infrastructure while maintaining the essential download functionality. The InnerBlocks approach provides several key benefits:

The solution maintains download functionality while providing access to familiar button controls, creating a better experience for both users and developers.
Key benefits include full theme.json support, consistent editing experience, and simplified maintenance, all while preserving essential download capabilities through proper template locking.

By enforcing a template lock and specific configuration, we ensure the download functionality remains intact while opening up enhanced styling and customization capabilities. This creates a better balance between maintaining core functionality and providing improved user control over the button's appearance.

@Mayank-Tripathi32 Mayank-Tripathi32 added the [Type] Enhancement A suggestion for improvement. label Jan 6, 2025
@Mayank-Tripathi32
Copy link
Contributor Author

related issue #57871 that recommends using file component for download links, but I need some inputs on "download" attribute if we go ahead with innerblock implementation

@Mamaduka Mamaduka added the [Block] File Affects the File Block label Jan 7, 2025
@Mamaduka Mamaduka changed the title File Component: Enable User Customization of Download Button Appearance File Block: Enable User Customization of Download Button Appearance Jan 7, 2025
@Mamaduka
Copy link
Member

Mamaduka commented Jan 7, 2025

@Mayank-Tripathi32

This is a duplicate of #57314. I would recommend searching for existing issues before creating a new one. Helps to avoid duplicates, and usually, old issues have more context.

@Mamaduka Mamaduka closed this as completed Jan 7, 2025
@Mayank-Tripathi32
Copy link
Contributor Author

@Mayank-Tripathi32

This is a duplicate of #57314. I would recommend searching for existing issues before creating a new one. Helps to avoid duplicates, and usually, old issues have more context.

Thank you for pointing that out. I did search for existing issues but might have missed this one. My apologies!

@Mamaduka
Copy link
Member

Mamaduka commented Jan 7, 2025

No worries, @Mayank-Tripathi32!

My trick is to narrow it down using labels. Each block has a separate label, so when I want to report something, let's say an Image block related, I'll filter issues first by label and then search keywords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] File Affects the File Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants