Sponsors list block#1122
Open
cjyabraham wants to merge 2 commits into
Open
Conversation
Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds a dynamic Gutenberg sponsor directory block backed by Google Sheets CSV data.
Changes:
- Adds authenticated CSV importing and validation.
- Renders filterable sponsor cards with modal details.
- Adds editor UI, frontend assets, filtering tests, and project configuration.
Reviewed changes
Copilot reviewed 16 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Allows plugin files while excluding dependencies. |
phpcs.xml |
Adds the plugin to PHP linting. |
sponsor-directory-block.php |
Bootstraps block and REST route. |
package.json |
Defines build, lint, and test tooling. |
includes/class-sponsor-directory-importer.php |
Fetches and validates CSV sponsor data. |
includes/render.php |
Server-renders filters, cards, and modals. |
src/block.json |
Defines block metadata and attributes. |
src/index.js |
Registers the dynamic block. |
src/edit.js |
Implements the CSV import editor UI. |
src/editor.scss |
Styles the editor interface. |
src/style.scss |
Styles the directory and modal. |
src/filter.js |
Implements filter matching. |
src/filter.test.js |
Tests filtering behavior. |
src/view.js |
Initializes frontend filtering. |
build/block.json |
Provides built block metadata. |
build/index.js |
Provides the compiled editor script. |
build/index.css |
Provides compiled editor styles. |
build/index.asset.php |
Declares editor dependencies. |
build/view.js |
Provides compiled frontend filtering. |
build/view.asset.php |
Declares frontend dependencies. |
build/style-index.css |
Provides compiled frontend styles. |
Files not reviewed (4)
- web/wp-content/plugins/sponsor-directory-block/build/index.css: Generated file
- web/wp-content/plugins/sponsor-directory-block/build/index.js: Generated file
- web/wp-content/plugins/sponsor-directory-block/build/style-index.css: Generated file
- web/wp-content/plugins/sponsor-directory-block/build/view.js: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| array( | ||
| 'timeout' => 15, | ||
| 'redirection' => 3, | ||
| 'limit_response_size' => self::MAX_RESPONSE_SIZE, |
Comment on lines
+50
to
+51
| count.textContent = | ||
| visibleCount === 1 ? '1 sponsor' : `${ visibleCount } sponsors`; |
| ob_start(); | ||
| ?> | ||
| <div <?php echo $wrapper_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> | ||
| <div class="sponsor-directory__filters" aria-label="<?php esc_attr_e( 'Filter sponsors', 'sponsor-directory-block' ); ?>"> |
| array( | ||
| 'class' => sanitize_html_class( $class_name ), | ||
| 'loading' => 'lazy', | ||
| 'alt' => $name . ' logo', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test page
Test Google Sheet
Test Google Sheet CSV
Initial prompt: