1337 add a meetings block for wp block themes#1383
Conversation
…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
joshreisner
left a comment
There was a problem hiding this comment.
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
joshreisner
left a comment
There was a problem hiding this comment.
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. |
- Use tabs insotead of spaces in block.json for consistency
|
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. |
|
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. |
|
FYI fixed the package-lock.json merge conflict. |
kiyote33
left a comment
There was a problem hiding this comment.
Hi @anchovie91471, just starting a walk-thru today. Thought I'd give you some feedback before diving into the code. Install went as expected after downloading the PR branch. Initial configuration to drop the Meetings block on the home page of my test site was trivial. I dropped a container block on the page, set it to full width, and dropped the Meetings block into the container. The default setting for the Meetings block was left at Meetings UI. First look found everything as expected with TSML UI displaying to the full width of the container.
Moving to the other short codes, I tried them 1 at a time and found the following results:
- Next Meetings. Clicked on link and got a 404 Page Not Found. Reset permalinks and still got the 404. On the Import page found the Data Source corrupted. Dropped the data source and recreated it. Problem solved with the 'Next Meetings' shortcode working as expected.
- Types List. As expected, the list contained the types being used in my test data and clicking on the different types gave me a listing of meetings which had that type checked.
- Regions List. Again as expected, the list contained the regions in my test data and clicking on a different region gave me a listing of meetings for that region.
Overall impression, no show stoppers. May need to do more investigation into why the corruption of the data source which seemed to occur between my initial load of the Meetings block and the change of settings to the 'Next Meetings' shortcode. I will do the investigation to find out if this is repeatable and needs to be addressed.
Before I dive into the code, could we get a merge of 3.15.1 into your code so I can test that everything works with our latest TSML? Much appreciate your work on this...
kiyote33
left a comment
There was a problem hiding this comment.
Not 100% sure the corrupted data source issue reported in an earlier comment is a bug related to this code, but it is repeatable. Here's the steps I took to repeat after 1st verifying I had a pristine environment with 36 test records:
- Deactivated and removed the TSML plugin from the Installed Plugins folder.
- After confirmation that the TSML plugin was removed, reinstalled and activated the plugin from the zip file in my Downloads folder.
- Checked the Imports page for the Data Source status which showed 36 records available from the test data source JSON feed. Verified that the Meeting List showed the 36 records.
- Switched the Meetings block from the default Meetings UI to the Next Meetings setting.
- Returned to my home page listing which had the next 5 meetings available listed.
- Clicked on the first in the listing and promptly got the 404 again.
- Verified that there are no meeting or regions available in the Meetings editor.
Seems obvious that the meetings and regions are being blown away on deactivation or removal of the TSML plugin, but that the cache file remains, as well as the Data Source settings in the Options table. This is probably not related to this PR, but I think it does need to be resolved.
|
Wow! Thanks for the thorough review @kiyote33 and thanks @gkovats for stepping in on the merge conflict. I completely missed that. Yep, I'll get the PR up to date with the latest TSML so we can test against that. One thing I recall @joshreisner mentioned to me when we discussed this a while back, was splitting the the block into 4 separate embeddable blocks, instead of just one with the dropdown. I can certainly do that if the consensus is that would be more user friendly. |
kiyote33
left a comment
There was a problem hiding this comment.
I like Josh's suggestion to have a separate block for each shortcode. I agree it would be more user friendly. Can we get a block for TSML too? Or do we need a shortcode for it first?
Do you mean the actual meeting list? (TSMI UI or Legacy). If so, there should be a choice in the dropdown for Meetings UI, which will render whichever is chosen in the settings for TSML. |
kiyote33
left a comment
There was a problem hiding this comment.
Yep. Currently we only get TSML UI. It doesn't reference the TSML display setting at all. So there's no way to get the Legacy UI display if it's set to TSML UI.
|
since we have a goal of deprecating legacy, my vote would be to have the block be TSML UI only |
…lock-for-wp-block-themes # Conflicts: # package-lock.json
|
OK. I've merge latest main into the branch @kiyote33 |
kiyote33
left a comment
There was a problem hiding this comment.
Works well in both classic and block themes.
package.json: - Added overrides in package.json for a few packages that threw audit warnings. - Added some build scripts - Added necessary scripts to build block
Setup styling components for all available css variables




Renders all TSML shortcodes as Gutenberg blocks.
Currently, this PR generates 2 files in the plugin root when running
npx mix --productionornpx 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.`