Conversation
Codecov Report
@@ Coverage Diff @@
## master #2164 +/- ##
==========================================
+ Coverage 23.83% 24.12% +0.28%
==========================================
Files 142 142
Lines 4459 4609 +150
Branches 756 794 +38
==========================================
+ Hits 1063 1112 +49
- Misses 2866 2933 +67
- Partials 530 564 +34
Continue to review full report at Codecov.
|
timmyc
left a comment
There was a problem hiding this comment.
While testing this out I hit an issue with linking to the attachment page. Steps to reproduce:
1- Add new gallery block
2- Select a few images
3- Link To "Attachment Page"
4- Save
When viewing the post on the front-end of the site, the images in the gallery are not linked. It does work for linking to "Media File"
blocks/library/gallery/index.js
Outdated
|
I also re-triggered the CI job that had failed, all looks green now. |
17a95c4 to
3e6e04f
Compare
|
@timmyc the Attachment link is weird - it works for some of my test images but not others, trying to figure out why since the data should be accurate |
|
@mkaz so I thought it might have just been certain images in my library too... but I tested with the same images using the gallery flow in the current editor and the links worked okay for me there with "attachment" selected. I didn't debug further, but thought something in the following line might be the culprit:
|
| ); | ||
| } | ||
|
|
||
| if ( props.linkto === 'attachment' && !! props.img.link ) { |
There was a problem hiding this comment.
It'd be nice to not duplicate the markup for links and do this instead:
https://github.com/WordPress/gutenberg/blob/master/blocks/library/image/index.js#L200
2b51b87 to
47172d1
Compare
blocks/library/gallery/index.js
Outdated
|
|
||
| edit( { attributes, setAttributes, focus, className } ) { | ||
| const { images = [], columns = defaultColumnsNumber( attributes ), align = 'none' } = attributes; | ||
| const setLinkto = ( value ) => setAttributes( { linkto: value } ); |
There was a problem hiding this comment.
tiny thing, but probably should camel case the linkTo :)
blocks/library/gallery/index.js
Outdated
| const setColumnsNumber = ( event ) => setAttributes( { columns: event.target.value } ); | ||
| const updateAlignment = ( nextAlign ) => setAttributes( { align: nextAlign } ); | ||
| const { imageCrop = true } = attributes; | ||
| const { linkto = 'none' } = attributes; |
There was a problem hiding this comment.
These could be moved to default attrs:
defaultAttributes: {
dropCap: false,
},
|
Also maybe the label + input could all fit in one row? |
|
@mtias I'm just using the SelectControl component and don't see any real options on how to keep it all on the same row - any suggestion? |
|
That's fine, we could look into the component itself in the future. |
| href = props.img.url; | ||
| break; | ||
| case 'attacment': | ||
| case 'attachment': |
There was a problem hiding this comment.
i always misspell that word too - funny that i didn't catch that when reviewing. 😄
* Release v1.26.0 (#2153) * Add tests for Latest-Posts Bock * Have the Automation tests Scroll the Block window to help locate Block buttons on Android * Update gutenberg reference * Update Gutenberg ref * Update Gutenberg ref * New template for release PRs This PR will add a new template for release PRs to make it easier to check all the steps needed and to standardize the release PRs. This template can then be used by using this link: `https://github.com/wordpress-mobile/gutenberg-mobile/pull/new?template=release_pull_request.md` * Update template file. * Fix: remove extra padding for post title and first `Paragraph` block (#2095) * Fix: remove extra padding for post title and first `Paragraph` block * Update Gutenberg ref * Add a new androidReplacements function to comply with Android Typography lint rules * Make sure the file gutenberg.pot exists before generating android and ios strings. * Update Gutenberg ref * Update gutenberg ref * Update gutenberg ref * Update gutenberg reference * Gutenberg update * Update Gutenberg ref * Update Gutenberg ref * Update Gutenberg ref * Update Gutenberg ref * Fix: prevent ripple effect on slider cell in BottomSheet and disable it completely on iOS (#2023) * prevent ripple effect on slider cell in BottomSheet and disable it completely on iOS * Update Gutenberg ref * Update Gutenberg ref * Accept multiple headers through OnAuthHeaderRequestedListener (#2080) * Blog layout template (#2114) * Update Gutenberg ref * Update Gutenberg ref * Update gutenberg reference * Fix failing UI tests Try scrolling in the Inserter for all platforms * Disable the failing test on iOS Co-authored-by: Matthew Kevins <mmkevins@yahoo.com> Co-authored-by: Pinar Olguc <pinarolguc@gmail.com> * Update gutenberg reference * Feat: Column block (#1661) * update ref to master (Columns Block) * Update gutenberg reference * Fix Latests Posts Tests by expanding the scroll to button functionality * Fix lint issue * Fix typography breakage in master To a version where the typography panel is not added to block settings. * Update GB reference. * Correct slider step value (#2119) * Update ref: Correct slider step accordingly to the platform * Update gb ref Co-authored-by: Pinar Olguc <pinarolguc@gmail.com> * v1.26.0 * Add some missing release notes * Update Podfile.lock * Update gb ref * Update bundles Co-authored-by: Chip Snyder <chip.snyder3@gmail.com> Co-authored-by: Matthew Kevins <mmkevins@yahoo.com> Co-authored-by: Gerardo Pacheco <gerardo.pacheco@automattic.com> Co-authored-by: Sérgio Estêvão <sergioestevao@gmail.com> Co-authored-by: jbinda <jakub.binda@gmail.com> Co-authored-by: Chip <chip.snyder@automattic.com> Co-authored-by: Maxime Biais <maxime.biais@gmail.com> Co-authored-by: Tugdual de Kerviler <dekervit@gmail.com> Co-authored-by: Klymentiy Haykov <forsver@gmail.com> Co-authored-by: Matthew Kevins <mkevins@users.noreply.github.com> Co-authored-by: Luke Walczak <lukasz.walczak.pwr@gmail.com> * Update gb ref Co-authored-by: Chip Snyder <chip.snyder3@gmail.com> Co-authored-by: Matthew Kevins <mmkevins@yahoo.com> Co-authored-by: Gerardo Pacheco <gerardo.pacheco@automattic.com> Co-authored-by: Sérgio Estêvão <sergioestevao@gmail.com> Co-authored-by: jbinda <jakub.binda@gmail.com> Co-authored-by: Chip <chip.snyder@automattic.com> Co-authored-by: Maxime Biais <maxime.biais@gmail.com> Co-authored-by: Tugdual de Kerviler <dekervit@gmail.com> Co-authored-by: Klymentiy Haykov <forsver@gmail.com> Co-authored-by: Matthew Kevins <mkevins@users.noreply.github.com> Co-authored-by: Luke Walczak <lukasz.walczak.pwr@gmail.com>


Allow user to select link to option for images similar to core gallery.
Add to Inspector Link To options: Attachment Page, Media File, or None.
See: #1448