Commit graph

287 commits

Author SHA1 Message Date
Kelly Dwan 2b7fb6cd21
Theme: Rename file
SCSS files should use `-` as word separators
2019-10-30 13:13:03 -05:00
Corey McKrill 454962522d
Re-enable logo validation
It was disabled for testing, and I forgot and committed it. 🤦
2019-10-29 17:22:11 -07:00
Corey McKrill 14109a1b3e
Pledges: Add columns to pledge list table
It's useful to have some at-a-glance info about pledges when scrolling
the list table.
2019-10-29 17:18:52 -07:00
Corey McKrill 83125dd8b2
Update pledge UI and email copy (#64)
Fixes #61
2019-10-29 16:37:14 -07:00
Kelly Dwan 9f47f83ef4
Pledge CPT: Remove "has contributors" check from the single pledge view 2019-10-29 18:09:44 -05:00
Ian Dunn 1c6d39cd2a
Theme: Add basic styles for My Pledges page.
There's more work to do here, but this gets us close enough to start beta testing.

See #56
2019-10-29 12:54:22 -07:00
Ian Dunn 858d70b045
My Pledges: Mark up page with live data.
See #56
2019-10-29 12:54:13 -07:00
Corey McKrill 5c5ae83287
Plugin: Add a system for logging events related to pledges and contributors (#54)
Uses action hooks to capture relevant events as log entries on a per-pledge basis. This provides a running history of a pledge and can be used as an audit log if questions arise about changes to a pledge or there are weird bugs.

Fixes #39
2019-10-29 12:46:13 -07:00
Ian Dunn 6209060eb2
Pledge List: Re-enable condition to only show staffed pledges.
Closes #43
2019-10-29 11:20:08 -07:00
Ian Dunn 189c61bfe8
Flip placeholder pending status to publish now that testing done. 2019-10-29 10:15:22 -07:00
Ian Dunn f409dbd3a6
XProfile: Return early when no contributors to avoid error. 2019-10-29 10:08:26 -07:00
Kelly Dwan bc867a344e
Pledge List: Style search results 2019-10-28 20:37:09 -04:00
Kelly Dwan 310a6876de
Pledge Form: Use slightly more screen reader friendly link text 2019-10-28 20:10:53 -04:00
Kelly Dwan aa8b1838cd
Pledge Form: Use agreement text as label content
This calls more attention to the agreement text, and correctly associates it with the input for screen reader users.
2019-10-28 20:09:38 -04:00
Kelly Dwan f49a938c1e
Theme Search: Fix search box alignment 2019-10-28 20:04:03 -04:00
Kelly Dwan 1336228976
Pledge List: Get real pledge form link from page 2019-10-28 20:02:17 -04:00
Kelly Dwan c367a00071
Pledge List: Style pagination 2019-10-28 19:58:22 -04:00
Kelly Dwan 14ed8d4d6b
Pledge List Filters: Update style and add filter on-change functionality
- Style search box & filter dropdown
- Enable sort filter on select change
- Fix some PHP notices
2019-10-28 19:39:16 -04:00
Kelly Dwan 5b5a1d50ff
Pledge List: Fix grid layout for small screens 2019-10-28 18:21:59 -04:00
Kelly Dwan ac1027b550
Homepage: Fix contributor highlight section 2019-10-28 18:21:54 -04:00
Kelly Dwan c6c4baf62b
Theme: Fix heading level styles 2019-10-28 17:02:45 -04:00
Kelly Dwan 840ae50ac5
Theme: Tweak paralleogram styles 2019-10-28 16:58:39 -04:00
Ian Dunn 67958d9a1a
Contributors: Create functionality for My Pledges page.
This don't add the styling yet, just the functionality.

See #56
Fixes #51
Fixes #30
2019-10-28 12:08:21 -07:00
Corey McKrill dbdcf26bd9 Theme: Single pledge view (#43)
* Theme: Create template part for single pledge

* Plugin: Add functions for handling xprofile data

* Plugin: Add helper function for getting contributor user objects

* Theme: Display aggregated contributor data on single pledge view

* Theme: Add functions, markup, and styles to show team badges

* Theme: Add badge for Test team

* Theme: Add tentative URL for report a pledge link

* Theme: Add support for post thumbnails

* Theme: Add org logo to single pledge view

* Theme: Update `$content_width` to 960

This matches the width of the content in the global header and
the About page.

* Move pledge template to a file used by the template heirarchy

* Clean up some PHPCS errors

* Move pledge structure out to just the list items

* Create file for single pledge styles

* style badge grid into a grid.

* Add a custom image size for the logo

* Update styles

* Un-hide pledges with no confirmed contributors

* Fix content width
2019-10-28 13:38:49 -04:00
Kelly Dwan 2ec665bcbb
Pledge Form: Don't show logo upload field in wp-admin
In wp-admin, the logo should be managed with the featured image UI.
2019-10-28 13:33:44 -04:00
Kelly Dwan f9d4a0bd59
Create a Pledge: Upload a logo (#45)
* Allow image uploads

* Add the logo as "generated" meta

This will be attached after we've processed the `$_FILES` object into an upload.

* Load image into media library, attach to the submitted pledge as a featured image.

* Move where image handling happens so we can pass back errors

* Pass back error if upload fails

* Create a validation function to do basic checking of form data

* Move logo uploading to a separate function, and rely on core checks for mime & filesize checking

* Tweak function name to be more clear

* Remove bmp, tiff, and ico file types
2019-10-28 11:47:56 -04:00
Ian Dunn 3f774fdb78
Pledge Form: Add ability to resend pledge confirmation email.
Fixes #49.
2019-10-26 22:18:28 -07:00
Ian Dunn 63f718bd9a
Pledge Form: Apply coding standards. 2019-10-26 11:00:03 -07:00
Ian Dunn c10699f97c
Contributors: Add ability to resend confirmation email.
Fixes: #50.
2019-10-26 10:59:06 -07:00
Ian Dunn 62f5335b51
Pledge: Email contributors for confirmation when pledge published.
Fixes #12
2019-10-26 10:55:00 -07:00
Ian Dunn 438173c10f
Email: Add notes about auth tokens. 2019-10-26 10:11:45 -07:00
Ian Dunn ff9767f478
Pledge: Correct action to prevent invalid early return.
This bug was introduced in 5ffca9420f, and prevented pledges from being updated when submitting via wp-admin.

See https://github.com/WordPress/five-for-the-future/pull/46#discussion_r339273741
2019-10-26 09:07:23 -07:00
Ian Dunn c4f2fe58ab
Pledge Form: Make email naming consistent.
This helps distinguish between _pledge_ and _contributor_ emails, and _verifying_ auth tokens and _confirming_ pledges.
2019-10-26 08:23:41 -07:00
Ian Dunn 35fa99324e
Email: Compare token with hash_equals() to mitigate timing attacks.
Props timothyblynjacobs
See #46
See https://make.wordpress.org/meta/2019/10/25/security-review-of-authentication-tokens/
2019-10-25 13:50:53 -07:00
Corey McKrill 838a490776
Pledge: Count number of confirmed contributors instead of using arbitrary number input (#52)
This will be more accurate and avoid confusion that could arise if the self-reported "Number of Employees Being Sponsored" didn't match the number of confirmed contributors listed on the pledge.

Having that counted number stored in post meta is still useful, though, so this also adds/updates that number for a pledge whenever a Contributor post changes its status.

Fixes #48
2019-10-25 13:39:13 -07:00
Kelly Dwan 553247cbf7
Pledge List: Display pledges in list with sort and search ability (#33)
* Use the post-type when choosing template partial
* Add pledge archive templates
* Style pledge list page
* Style individual pledge
* Use pledge featured image for the logo
* Fix aspect ratio of image
* Add real contributors to the pledges
* Enable sorting and searching of pledges
* Add pledge sorting markup
* Style the page header
* Restrict any pledges with no contributors from being shown on the frontend
* Update contributor count key name
2019-10-25 16:34:46 -04:00
Kelly Dwan f47024efda
Contributors: Check if a pledge exists before displaying the pledge name
If somehow a pledge is deleted, the contributors listing in wp-admin shows an error trying to display the linked pledge.
2019-10-25 16:21:33 -04:00
Ian Dunn 5ffca9420f
Email: Send pledge confirmation with authentication token. (#46)
Email: Send pledge confirmation with authentication token.

Fixes #34.
Fixes #10.
2019-10-25 12:07:09 -07:00
Ian Dunn 284e616c84
Pledge Form: Clarify that we're asking for WordPress.org usernames. 2019-10-25 07:57:33 -07:00
Corey McKrill 847e99f44e
Pledge Form: Hide 'manage existing pledge' link for the time being 2019-10-24 21:04:44 -07:00
Corey McKrill 59713ca0f1
Pledges: Move contributor management UI to separate file (#47)
Having both the input for adding a comma separated list of contributors
to a new pledge and the UI for managing the contributors on an existing
pledge in the same file was confusing and it conflated two different
pieces of functionality. It also caused `undefined index` errors in some
views  because `'pledge-contributors'` only exists when submitting the
new pledge form.
2019-10-24 20:06:47 -07:00
Ian Dunn 6fe5a92c7b
Composer: Document why PHPUnit 7 is used instead of 8. 2019-10-24 16:22:55 -07:00
Kelly Dwan 157b73e13f
Homepage: clean up item positioning
- Remove accidental drop-shadow (mistake in Figma)
- Use the correct fonts for callout text
- Switch to a fixed width of rems over percentages to make alignment easier
- Use rems to outdent quote so it lines up with the edge of the photo
- Overlap the blue box + photo on larger screens, and offset the quote down
- Remove unused selectors
- Fix quote display in the editor
2019-10-24 13:10:40 -04:00
Ian Dunn f888fd85c8
Apply coding standards. 2019-10-24 08:12:55 -07:00
Ian Dunn 33d8ed54b1
Pledge Form: Encourge group email addresses for perennial access.
Also, clarfy that the field is referring to an address, rather than a piece of email.
2019-10-24 08:12:55 -07:00
Ian Dunn 6b33c4dbd0
Pledge Form: Update string to reflect latest flows.
The link that they're emailed is to confirm their address, rather than to manage the pledge.

Their pledge will be published once the address is confirmed and contributors have confirmed their participation, rather than after moderation.
2019-10-24 08:12:55 -07:00
Ian Dunn 8020e43fb9
Pledge Form: Use relative link for cross-environment compatibility. 2019-10-24 08:12:55 -07:00
Ian Dunn c527b5f8a0
Composer: Warn about bug in test watcher interactive mode. 2019-10-24 08:12:48 -07:00
Ian Dunn eec9f5cb61
Tests: Setup PHPUnit and PHPUnit Watcher. 2019-10-23 14:27:26 -07:00
Corey McKrill 65bd3ad5af
Pledge form: Add a blurb for the "Agree" checkbox (#44)
When submitting the form for a new pledge, the submitter must check a box to acknowledge that they understand and agree with the program expectations. The agreement blurb links to a separate page on the 5ftF site outlining what those expectations are.

Fixes #40
2019-10-23 13:47:15 -07:00