Skip to content

[WIP] Introduce blocks for homepage content - #219

Draft
matt-bernhardt wants to merge 26 commits into
masterfrom
block-remix
Draft

[WIP] Introduce blocks for homepage content#219
matt-bernhardt wants to merge 26 commits into
masterfrom
block-remix

Conversation

@matt-bernhardt

@matt-bernhardt matt-bernhardt commented Sep 4, 2026

Copy link
Copy Markdown
Member

This is the feature branch which introduces a set of blocks that allow us to more easily managed content on the new Libraries' homepage.


Current roadmap:

  • Cleanup of boilerplate (view.js may not need to exist, console.log certainly doesn't)
  • Confirm that ensure-build.yml is doing what we expect now
  • Remove readme.txt
  • Remove main entry from mitlib-blocks package.json
  • Add feature to enable selecting a staff member from featured block
  • State a version number in package.json, rather than "latest"

djanelle-mit and others added 18 commits August 31, 2026 16:10
This sets up a root-level package.json that will manage all the plugins' internal dependencies
via workspaces. It allows us to only have one package-lock.json file, rather than one per plugin,
which makes keeping dependencies in sync across plugins easier to achieve.

It also saves a bit of space in the respository, as these files can be tens of thousands of lines long and largely duplicative.
** Why are these changes being introduced:

We already have a plugin that implements the hours ecosystem, so it
makes sense to define the new hours block for the homepage within that
plugin, rather than in a separate plugin.

** How does this address that need:

This moves the content of the hours block into the existing hours
plugin. As part of this move, a few things get adjusted:

* Package.json at the repostitory root gets the new plugin path added to
its list of workspaces

* Because the hours plugin already uses the src/ folder to define PHP
classes, it doesn't make sense to re-use that location for the block
source files. We instead take a page from WordPress itself, and place
those materials in the blocks/ folder.

* Because the path to the block materials changes, we need to update the
package.json file in the plugin to pass the --source-path argument to
the build and start scripts.

* The PHP script at the plugin root needs to merge with the existing
plugin. The only unique part from the new plugin is the block
block registration function (which is hooked to the init action) - so we
use that and leave the rest of the boilerplate behind.

* The readme.txt file from the old plugin is no longer needed, as this
is a file we don't really use in this monorepo.

* We also re-run the build command to make sure that everything is wired
up correctly. This updates the hash and index.js file.

* All of this means we bump the plugin version number.

** Document any side effects to this change:

Hopefully none...
@matt-bernhardt matt-bernhardt changed the title Block remix Block CI debugging Sep 4, 2026
(Squashed to remove build artifacts for on block)
@matt-bernhardt matt-bernhardt changed the title Block CI debugging [WIP] Introduce blcoks for homepage content Sep 8, 2026
@matt-bernhardt matt-bernhardt changed the title [WIP] Introduce blcoks for homepage content [WIP] Introduce blocks for homepage content Sep 8, 2026
djanelle-mit and others added 7 commits September 8, 2026 12:41
This moves the source materials for the hours block into the new mitlib-blocks plugin

- block.json
- edit.js
- editor.scss
- index.js
- save.js
- style.scss

It doesn't touch the built materials, that will happen in a future commit
Now that the hours block has been relocated into the new plugin, and
the naming convention for folders in that plugin have been udpated,
there are a few cleanup tasks that are necessary for everything to
function:

- package.json at the root level now only lists a single workspace, as
  the hours plugin no longer has one
- package.json within mitlib-blocks needs to be told where to find the
  block materials
- The hours plugin itself no longer needs a register_blocks function,
  nor does it need package.json or .gitignore
- The text-domain value for the hours block needs to be updated to use
  its new home
- The mitlib-blocks gitignore needs to ignore .map files

There is an additional side effect in this commit, which is not strictly
related but seems like a good idea at this point:

- The PHPCS configuration now ignores materials in a build/ folder,
  as these are not meant to be run through any sort of static code
  analysis.

Squash me
This also removes the deprecated build materials from the hours plugin
Move Hours block into new block plugin

@accesslint accesslint Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Found 1 issue across 1 rule.

Reviewed by AccessLint, which checks every pull request for accessibility issues.

?>

</div>
<span class="hero-image-credit">from the <a href="https://archivesspace.mit.edu/repositories/2/resources/603">Harold E. Edgerton papers</a></span>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WCAG 4.1.2: Focusable element inside a "img" role whose children are presentational.

Elements with a role that makes children presentational must not contain focusable content.

Details

Roles like button, checkbox, img, tab, and others make their children presentational — hidden from assistive technologies. If those children are focusable, keyboard users can reach elements that screen reader users cannot perceive. Move focusable content outside the parent or remove the focusability.

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.

2 participants