Open
Conversation
✅ Deploy Preview for decap-www ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds a new “Report a Security Vulnerability” page to the Hugo-based Decap CMS website, using Netlify Forms for submission handling, and introduces shared UI helpers (page hero + form styling) while refactoring the Community page header.
Changes:
- Add a new report-vulnerability layout, content page, form partial, and client-side form submission script.
- Introduce shared
page-heropartial and related styling; refactor Community page to use it and adjust front matter/CMS fields accordingly. - Add generic form styles and an
is-hiddenutility class; bump Netlify Hugo version.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| static/admin/config.yml | Updates Community collection fields to match new front matter shape (linkTitle/title/description). |
| netlify.toml | Pins Netlify builds to Hugo 0.155.3. |
| layouts/report-vulnerability/single.html | New page layout wiring page hero, form partial, page content, and page-specific JS. |
| layouts/partials/page-hero.html | New reusable hero partial for page title + description. |
| layouts/partials/forms/vulnerability-report-form.html | New Netlify-backed vulnerability report form markup. |
| layouts/_default/community.html | Refactors Community header to use page-hero. |
| content/report-vulnerability.md | Adds the new vulnerability reporting page and its form field configuration. |
| content/community.md | Adjusts Community front matter to match the new hero model (linkTitle/title/description). |
| assets/styles/style.scss | Adds imports for new forms and page-hero styles; modifies component imports. |
| assets/styles/layouts/_community.scss | Removes old community header spacing now handled by page-hero. |
| assets/styles/components/_search.scss | Small tweak to avoid form margin impacting search form. |
| assets/styles/components/_page-hero.scss | Adds spacing for the new page hero component. |
| assets/styles/components/_button.scss | Adds disabled button styling (used by the form submit button). |
| assets/styles/_forms.scss | Adds global form element styling and success/error message styling. |
| assets/styles/_base.scss | Adds .is-hidden helper class for toggling form UI states. |
| assets/scripts/vulnerability-form.js | Adds client-side POST submission and success/error UI handling. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
yanthomasdev
left a comment
There was a problem hiding this comment.
Good work @martinjagodic, I have a few suggestions
| if (!res.ok) { | ||
| throw new Error(`HTTP error! status: ${res.status}`) | ||
| } | ||
| submitButton.disabled = false |
Contributor
There was a problem hiding this comment.
No need to reenable the button in the success case since the form is going to be hidden
Suggested change
| submitButton.disabled = false |
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
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.
We need a way to report vulnerabilities; this form will do the job.
Test here:
https://deploy-preview-151--decap-www.netlify.app/report-vulnerability/