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

Proposal: Add placeholder text to remind users to fill it in #65

Closed
wants to merge 1 commit into from

Conversation

candy02058912
Copy link
Contributor

@candy02058912 candy02058912 commented Aug 28, 2024

Related to #57
This is a proposal since we're not able to use metadata/bindings.

Walkthrough (with audio)

Demo.mp4

@candy02058912 candy02058912 changed the title Add placeholder text to remind users to fill it in Proposal: Add placeholder text to remind users to fill it in Aug 28, 2024
@candy02058912 candy02058912 marked this pull request as ready for review August 28, 2024 09:22
@bacoords
Copy link
Collaborator

Thanks! I know that placeholders are also an issue in core and are going to be (hopefully) fixed in the next GB release and make it into 6.7.

I also noticed that sometimes this is an issue for me and sometimes it's not, so I want to understand to see why that is.

The only issue I see is that we (and core) might actually want to allow empty post meta fields in bindings, right? Couldn't a user want to leave a field empty?

That said, if this isn't resolved upstream, I think this PR is a good middleground because non-editable fields is not good! So I'd say we merge and if it gets solved in GB then we can always remove

@bacoords
Copy link
Collaborator

Related to #63

@zaguiini
Copy link
Contributor

zaguiini commented Aug 28, 2024

I love the idea, and I think it's in the right direction.

What if we did it slightly different: instead of asking them to put a placeholder, if the value is empty, we fill it with the block variation name? We could have some different defaults depending on the block. For example, this wouldn't work for Image. We could fill a default value for ID and url, just so it's not ever empty.

Another possibility is we always set a default value for the post meta field. I thought this was already happening, but apparently it isn't. I'll check.

EDIT: While I was thinking about it, why not simply enforce a default value before letting them bind the block? This way, we'll always have a value. I think this is the easiest way, especially if we're talking about handling Images and Buttons.

@autumnfjeld
Copy link
Contributor

The only issue I see is that we (and core) might actually want to allow empty post meta fields in bindings, right? Couldn't a user want to leave a field empty?

Hpefully we find this out from people using the plugin. It could be interesting to have a page linked in the readme "Things we'd like to know."

@autumnfjeld
Copy link
Contributor

image

This would be the "minimum" good solution. It is better than nothing. It clearly indicates "this is a bound block and needs a placeholder value."

But better would be if @zaguiini 's ideas can be done.

@zaguiini zaguiini closed this Aug 29, 2024
@zaguiini zaguiini deleted the try/placeholder-alternative branch August 30, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants