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

Attribution #1287

Merged
merged 80 commits into from Jul 25, 2018

Conversation

Projects
4 participants
@bdolor
Contributor

bdolor commented Jul 19, 2018

This PR adds a PB standard way to add attributions to images.

  • The input fields are integrated into the media library
  • The display of attributions in the content area can be turned on or off (default off) in global theme options
  • The html output are formatted according to my best interpretation of best practices for attribution and passes RDFa validation here
  • They can appear at the bottom of a chapter below the content area and above footnotes:
  • Have been created via shortcode to provide an 'easier' transition path to Gutenberg. Also for future consideration, the handler [media_attributions id='33'] generates an individual attribution statement if given the id value of an attachment.
  • exposes metadata that are visible at the wp-json/wp/v2/media endpoint.

Input:

image

Theme Options:

image

Output

image

Individual Output

image

REST API endpoint

image

bdolor and others added some commits Jul 6, 2018

@greatislander greatislander added this to In progress in Pressbooks 5.5.0 via automation Jul 19, 2018

@greatislander

This comment has been minimized.

Show comment
Hide comment
@greatislander

greatislander Jul 19, 2018

Member

@bdolor If you run:

vendor/bin/phpcbf --standard=phpcs.ruleset.xml inc/shortcodes/attributions/class-attachments.php

That should fix the sniff error.

Member

greatislander commented Jul 19, 2018

@bdolor If you run:

vendor/bin/phpcbf --standard=phpcs.ruleset.xml inc/shortcodes/attributions/class-attachments.php

That should fix the sniff error.

@greatislander

This comment has been minimized.

Show comment
Hide comment
@greatislander

greatislander Jul 19, 2018

Member

And thanks for all your and @alex-418's work on this! Looking forward to reviewing this coming sprint.

Member

greatislander commented Jul 19, 2018

And thanks for all your and @alex-418's work on this! Looking forward to reviewing this coming sprint.

@bdolor

This comment has been minimized.

Show comment
Hide comment
@bdolor

bdolor Jul 19, 2018

Contributor

@greatislander - it was a pleasure. Please let us know if you need anything else or have any questions.

Contributor

bdolor commented Jul 19, 2018

@greatislander - it was a pleasure. Please let us know if you need anything else or have any questions.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Jul 19, 2018

Codecov Report

Merging #1287 into dev will increase coverage by 0.06%.
The diff coverage is 65.59%.

@@             Coverage Diff             @@
##               dev    #1287      +/-   ##
===========================================
+ Coverage     60.6%   60.67%   +0.06%     
- Complexity    4006     4042      +36     
===========================================
  Files          109      111       +2     
  Lines        17547    17796     +249     
===========================================
+ Hits         10634    10797     +163     
- Misses        6913     6999      +86

codecov bot commented Jul 19, 2018

Codecov Report

Merging #1287 into dev will increase coverage by 0.06%.
The diff coverage is 65.59%.

@@             Coverage Diff             @@
##               dev    #1287      +/-   ##
===========================================
+ Coverage     60.6%   60.67%   +0.06%     
- Complexity    4006     4042      +36     
===========================================
  Files          109      111       +2     
  Lines        17547    17796     +249     
===========================================
+ Hits         10634    10797     +163     
- Misses        6913     6999      +86
@connerbw

Except for opinion on how spaces should look, very nice work, thank you.

Pressbooks 5.5.0 automation moved this from In progress to Needs review Jul 23, 2018

Pressbooks 5.5.0 automation moved this from Needs review to Reviewer approved Jul 24, 2018

@greatislander

Thanks again @alex-418 and @bdolor. I've left a few requests for (potential) changes, happy to set up a call to discuss. I don't see any significant blockers to merging this later in the week.

Pressbooks 5.5.0 automation moved this from Reviewer approved to Needs review Jul 24, 2018

@greatislander greatislander changed the base branch from fivepointfive to dev Jul 24, 2018

greatislander and others added some commits Jul 24, 2018

@greatislander

See comment re: aligned equals signs.

Show outdated Hide outdated inc/admin/attachments/namespace.php

Pressbooks 5.5.0 automation moved this from Needs review to Reviewer approved Jul 25, 2018

@greatislander greatislander merged commit d771ad6 into pressbooks:dev Jul 25, 2018

3 checks passed

codecov/patch 65.59% of diff hit (target 60.6%)
Details
codecov/project 60.67% (+0.06%) compared to a6b5f50
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Pressbooks 5.5.0 automation moved this from Reviewer approved to Done Jul 25, 2018

@greatislander

This comment has been minimized.

Show comment
Hide comment
@greatislander

greatislander Jul 25, 2018

Member

Thanks all! 🎉

Member

greatislander commented Jul 25, 2018

Thanks all! 🎉

@bdolor bdolor deleted the BCcampus:attribution branch Jul 30, 2018

@bdolor bdolor referenced this pull request Aug 8, 2018

Open

Find and use CC-licensed images #109

2 of 8 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment