-
Notifications
You must be signed in to change notification settings - Fork 79
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
Blocks: Create a Live Schedule block #243
Conversation
fabbddb
to
9fa8bd9
Compare
public_html/wp-content/mu-plugins/blocks/source/blocks/live-schedule/block.js
Outdated
Show resolved
Hide resolved
A future improvement could be to add a setting to restrict to a single track, so this block could be used on a livestream page. |
b33224d
to
edda0fb
Compare
This uses the code from the day of event template to create a Live Schedule block
This lets us request the API every 5 minutes to refresh the session data, while still updating the schedule rapidly.
Since front-end.js is its own entrypoint, the CSS imported there is pulled into `live-schedule.css`, while CSS imported into `index.js` is pulled in the global blocks.css which is loaded as the editor_style for all WC blocks.
edda0fb
to
3ec58c6
Compare
Rebased to remove the eslint The data we use to populate that is in |
Add a new block called "Live Schedule", which can be used on the Day of Event template (or any other page). Combined with #241, this will let organizers have total control over the content of the Day of Event template.
This also removes the need for a separate build script/process in
mu-plugins/theme-templates
, that will be removed in a following PR. It does remove the self-updating "Latest Posts" section, but organizers can use the Latest Posts block if they want, and this reduces the repeat API calls. If more organizers want this functionality we can see about hooking into the Latest Posts block.Fixes #127 – You can customize the heading text and level in the block UI.
See #130 – Addresses a few issues from this issue
Screenshots
In wp-admin, it only displays a placeholder (for now). The headings are customized in the sidebar.
No sessions upcoming:
List of sessions (faked "now" to be 10am):
Still to do (in following PRs)
stripTagsAndEncodeText
and support diacritics.To test
$data['live-schedule']
callednowOverride
which should be a fake "now" in miliseconds).