Skip to content
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

[Latest Posts] adds author option to latest posts block #20595

Closed
wants to merge 9 commits into from

Conversation

draganescu
Copy link
Contributor

@draganescu draganescu commented Mar 2, 2020

Description

Props to @anischarolia-multidots this is simply #17163 refreshed to work with current master.
Closes: #17681

How has this been tested?

Tested locally by:

  1. Make sure you have some posts
  2. Add a new page or post
  3. Inser a LatestPosts block
  4. Use the inspector option "Display post author" to toggle author on

Screenshots

Screenshot 2020-03-11 at 09 25 31

Types of changes

Non breaking changes adding an InspectorControl to the LatestPosts block.

@github-actions
Copy link

github-actions bot commented Mar 2, 2020

Size Change: -30.1 kB (3%)

Total Size: 835 kB

Filename Size Change
build/a11y/index.js 1.02 kB +19 B (1%)
build/annotations/index.js 3.62 kB +191 B (5%) 🔍
build/api-fetch/index.js 3.39 kB +7 B (0%)
build/autop/index.js 2.83 kB +240 B (8%) 🔍
build/block-directory/index.js 6.93 kB +912 B (13%) ⚠️
build/block-directory/style-rtl.css 790 B +30 B (3%)
build/block-directory/style.css 791 B +31 B (3%)
build/block-editor/index.js 105 kB +3.27 kB (3%)
build/block-editor/style-rtl.css 10.8 kB -138 B (1%)
build/block-editor/style.css 10.8 kB -132 B (1%)
build/block-library/editor-rtl.css 7.19 kB -38 B (0%)
build/block-library/editor.css 7.19 kB -38 B (0%)
build/block-library/index.js 118 kB +8.47 kB (7%) 🔍
build/block-library/style-rtl.css 7.48 kB +51 B (0%)
build/block-library/style.css 7.49 kB +47 B (0%)
build/block-library/theme-rtl.css 683 B +14 B (2%)
build/block-library/theme.css 685 B +14 B (2%)
build/block-serialization-default-parser/index.js 1.88 kB +236 B (12%) ⚠️
build/blocks/index.js 48.1 kB -9.38 kB (19%) 👏
build/components/index.js 182 kB -8.88 kB (4%)
build/components/style-rtl.css 17.1 kB +1.3 kB (7%) 🔍
build/components/style.css 17 kB +1.3 kB (7%) 🔍
build/compose/index.js 6.67 kB +468 B (7%) 🔍
build/core-data/index.js 11.4 kB +737 B (6%) 🔍
build/data-controls/index.js 1.29 kB +253 B (19%) ⚠️
build/data/index.js 8.42 kB +169 B (2%)
build/date/index.js 5.47 kB +101 B (1%)
build/deprecated/index.js 772 B +1 B
build/dom-ready/index.js 569 B +1 B
build/dom/index.js 3.11 kB +57 B (1%)
build/edit-post/index.js 28.1 kB -63.1 kB (224%) 🏆
build/edit-post/style-rtl.css 12.2 kB +3.77 kB (30%) 🚨
build/edit-post/style.css 12.2 kB +3.78 kB (30%) 🚨
build/edit-site/index.js 12 kB +5.3 kB (44%) 🚨
build/edit-site/style-rtl.css 5.22 kB +2.31 kB (44%) 🚨
build/edit-site/style.css 5.22 kB +2.32 kB (44%) 🚨
build/edit-widgets/index.js 7.87 kB +3.44 kB (43%) 🚨
build/edit-widgets/style-rtl.css 4.69 kB +2.13 kB (45%) 🚨
build/edit-widgets/style.css 4.69 kB +2.13 kB (45%) 🚨
build/editor/editor-styles-rtl.css 425 B -3 B (0%)
build/editor/editor-styles.css 428 B -3 B (0%)
build/editor/index.js 44.3 kB +1.56 kB (3%)
build/editor/style-rtl.css 5.07 kB +1.69 kB (33%) 🚨
build/editor/style.css 5.08 kB +1.69 kB (33%) 🚨
build/element/index.js 4.65 kB +204 B (4%)
build/format-library/index.js 7.64 kB +691 B (9%) 🔍
build/hooks/index.js 2.13 kB +206 B (9%) 🔍
build/i18n/index.js 3.56 kB +77 B (2%)
build/is-shallow-equal/index.js 711 B +1 B
build/keyboard-shortcuts/index.js 2.51 kB +209 B (8%) 🔍
build/keycodes/index.js 1.94 kB +253 B (13%) ⚠️
build/list-reusable-blocks/index.js 3.13 kB +142 B (4%)
build/media-utils/index.js 5.29 kB +446 B (8%) 🔍
build/notices/index.js 1.79 kB +213 B (11%) ⚠️
build/nux/index.js 3.4 kB +392 B (11%) ⚠️
build/plugins/index.js 2.56 kB +26 B (1%)
build/priority-queue/index.js 789 B +8 B (1%)
build/redux-routine/index.js 2.85 kB +16 B (0%)
build/rich-text/index.js 14.8 kB +315 B (2%)
build/server-side-render/index.js 2.68 kB +128 B (4%)
build/shortcode/index.js 1.7 kB -7 B (0%)
build/token-list/index.js 1.28 kB +11 B (0%)
build/url/index.js 4.02 kB +9 B (0%)
build/viewport/index.js 1.84 kB +234 B (12%) ⚠️
build/wordcount/index.js 1.17 kB -1 B
ℹ️ View Unchanged
Filename Size Change
build/blob/index.js 620 B 0 B
build/block-serialization-spec-parser/index.js 3.1 kB 0 B
build/edit-navigation/index.js 6.6 kB 0 B
build/edit-navigation/style-rtl.css 832 B 0 B
build/edit-navigation/style.css 831 B 0 B
build/escape-html/index.js 733 B 0 B
build/format-library/style-rtl.css 502 B 0 B
build/format-library/style.css 502 B 0 B
build/html-entities/index.js 622 B 0 B
build/list-reusable-blocks/style-rtl.css 226 B 0 B
build/list-reusable-blocks/style.css 226 B 0 B
build/nux/style-rtl.css 616 B 0 B
build/nux/style.css 613 B 0 B
build/primitives/index.js 1.5 kB 0 B
build/warning/index.js 1.14 kB 0 B

compressed-size-action

@draganescu draganescu force-pushed the anischarolia-multidots-master branch from 1419395 to 94077ca Compare March 9, 2020 07:48
@draganescu draganescu marked this pull request as ready for review March 11, 2020 07:20
@draganescu draganescu changed the title [refresh patch] adds author option to latest posts block [Latest Posts] adds author option to latest posts block Mar 11, 2020
packages/block-library/src/latest-posts/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/latest-posts/index.php Outdated Show resolved Hide resolved
packages/block-library/src/latest-posts/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/latest-posts/edit.js Outdated Show resolved Hide resolved
@talldan talldan added [Block] Latest Posts Affects the Latest Posts Block [Type] Enhancement A suggestion for improvement. labels Mar 20, 2020
@draganescu draganescu force-pushed the anischarolia-multidots-master branch from 7cd6acd to d00c4cd Compare March 20, 2020 11:38
@draganescu draganescu requested review from nerrad and ntwb as code owners March 24, 2020 13:32
@draganescu draganescu force-pushed the anischarolia-multidots-master branch from 0b94789 to 3ae73d8 Compare March 26, 2020 13:34
@pbrocks
Copy link

pbrocks commented Apr 2, 2020

Reviewed the functionality of this PR and it works as expected.

Using Gutenberg.run, I imported some posts, created a post, and added the Latest Posts block. Then in the sidebar, I was able to toggle the show author, as well as post_content and date.

Latest-Posts-backend

LatestPosts-frontend

latest-posts-author-gutenberg-run

draganescu and others added 2 commits May 18, 2020 09:38
Co-authored-by: Zebulan Stanphill <zebulanstanphill@protonmail.com>
Co-authored-by: Zebulan Stanphill <zebulanstanphill@protonmail.com>
@draganescu
Copy link
Contributor Author

@karmatosed I see you approved #17163. However that PR seems to have gone stale and I've refreshed it here.

@draganescu
Copy link
Contributor Author

#16169 solved this.

@draganescu draganescu closed this Jun 15, 2020
@aristath aristath deleted the anischarolia-multidots-master branch November 10, 2020 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest Posts Block: Option to show/hide the post author
4 participants