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

1337 add a meetings block for wp block themes #1383

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

anchovie91471
Copy link
Collaborator

Renders all TSML shortcodes as Gutenberg blocks.

  • TSML UI (both versions)
  • Regions list
  • Upcoming meetings
  • Types list

Currently, this PR generates 2 files in the plugin root when running npx mix --production or npx mix watch (undefined.js & undefined.asset.php). These are unnecessary, and were added to the .gitignore as a stop gap, but this is not ideal. Hoping to get some assistance on finding a better way to compile assets or to fix the anomalous files being generated.
`

@anchovie91471 anchovie91471 linked an issue Mar 9, 2024 that may be closed by this pull request
…files

- Removed @tinypixelco/laravel-mix-wp-blocks & @wordpress/dependency-extraction-webpack-plugin dependencies
- Added @wordpress/scripts dependency
- Moveed render.php to block directory (best practice)
- Set .gitignore, webpack.mix.js & mix-manifest.json back to original content
},
"message": {
"type": "string",
"default": "There are no upcoming meetings today. Please check back tomorrow."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this text accurate? this seems like it applies more to the Upcoming Meetings widget?

if this block embeds TSML UI it should probably say something like "TSML UI could not be embedded" - not sure what scenario this wouldn't show…

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a config value the user can change in the block settings when there are no upcoming meetings listed. It only shows up in the block config for that block, but needs a starting value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where that setting shows up.

Screenshot 2024-03-23 at 10 04 21 AM

{label: 'Meetings UI', value: 'tsml_ui'},
{label: 'Next Meetings', value: 'tsml_next_meetings'},
{label: 'Types List', value: 'tsml_types_list'},
{label: 'Regions List', value: 'tsml_regions_list'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these options show up anywhere? i don't see them in the block editor but i might be looking in the wrong place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you add the "Meetings" block, and click on the block, that setting should show up as a dropdown.

Screenshot 2024-03-23 at 10 02 40 AM

Copy link
Contributor

@joshreisner joshreisner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few minor questions

this seems great, i was able to embed the block

i then struggled mightily trying to get it to go wider in 2024 and couldn't, but i don't think that can be helped by us, right? there's no way to make it easier to go wider?

it would be great if we could make a loom or other short screencast video showing how to make the block wider and link it from the description, but that can be in a future PR

Copy link
Contributor

@joshreisner joshreisner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh ok i see your response - i'd like to discuss this a little before merging

@anchovie91471
Copy link
Collaborator Author

The align toolbar is where you set the width/alignment. I agree, a screenshot at the very least or a short vid might be helpful. I think people who are comfortable with the block editor might know where to look.

I am going to push one more commit to the PR to set .gitignore and webpack.mix.js back to the original files. It looks like my IDE converted tabs to spaces.

Screenshot 2024-03-23 at 10 06 21 AM

left a few minor questions

this seems great, i was able to embed the block

i then struggled mightily trying to get it to go wider in 2024 and couldn't, but i don't think that can be helped by us, right? there's no way to make it easier to go wider?

it would be great if we could make a loom or other short screencast video showing how to make the block wider and link it from the description, but that can be in a future PR

@anchovie91471
Copy link
Collaborator Author

oh ok i see your response - i'd like to discuss this a little before merging

I think we should. What I did, eliminates the extra files generated by Mix, but adds a build step so we may want to discuss that in addition to whatever you'd like to discuss.

@joshreisner
Copy link
Contributor

maybe i'm trying to add it to the wrong place, but i don't see width options on the block

Screenshot 2024-03-23 at 8 14 32 AM

nor on the columns parent

Screenshot 2024-03-23 at 8 14 45 AM

- Use tabs insotead of spaces in block.json for consistency
@anchovie91471
Copy link
Collaborator Author

anchovie91471 commented Mar 23, 2024

What theme are you using? 2024?

I think themes have to declare support for those options. It may be that we can declare that support in TSML. I can check.

@anchovie91471
Copy link
Collaborator Author

I didn't realize I should have added support for alignWide in the block.json. Hopefully the latest commit fixes the issue with the alignment toolbar.

@joshreisner
Copy link
Contributor

looks like dependabot's pr made a conflict in package-lock probably need to npm i to resolve it

i'm not seeing alignment options, but perhaps i'm doing it wrong? maybe we could meet at some point and you could show me how to do it?

also should i still be seeing "select a block type" on the right?
Screenshot 2024-03-30 at 8 41 30 AM

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.

Add a Meetings block (for WP block themes)
2 participants