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

MWPW-142590 - [Share] enhancement - ability to edit text above icons #2070

Merged
merged 7 commits into from
Apr 19, 2024

Conversation

ryanmparrish
Copy link
Contributor

Authors would like to modify the 'Share this page' text that appears above the social icons in the Share block.

  • Enabled author-able share titles
  • Updated the twitter logo use new X version
Screen Shot 2024-03-25 at 1 47 09 PM

Note: The variant .inline does not support a title and strips out any authored text in the block content.

Resolves: MWPW-142590

Test URLs:

Authoring Docs

Testing notes: To author a custom title in the Share block, simply add the title in the blocks first content row. Works with or without the custom share url authoring options.

Screen Shot 2024-03-25 at 2 00 16 PM

@ryanmparrish ryanmparrish added the needs-verification PR requires E2E testing by a reviewer label Mar 25, 2024
Copy link
Contributor

aem-code-sync bot commented Mar 25, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link
Contributor

aem-code-sync bot commented Mar 25, 2024

libs/blocks/share/share.js Outdated Show resolved Hide resolved
libs/blocks/share/share.js Outdated Show resolved Hide resolved
libs/blocks/share/share.js Outdated Show resolved Hide resolved
@aem-code-sync aem-code-sync bot temporarily deployed to rparrish/share-update March 25, 2024 20:06 Inactive
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.40%. Comparing base (1f48cda) to head (0f0f412).
Report is 32 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #2070      +/-   ##
==========================================
+ Coverage   96.35%   96.40%   +0.04%     
==========================================
  Files         165      165              
  Lines       43534    43558      +24     
==========================================
+ Hits        41947    41991      +44     
+ Misses       1587     1567      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skumar09 skumar09 added the run-nala Run Nala Test Automation against PR label Mar 26, 2024
Copy link
Contributor

@elan-tbx elan-tbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple nits but looking good to me otherwise!

libs/blocks/share/share.js Outdated Show resolved Hide resolved
const childDiv = rows[0].querySelector(':scope > div');
const emptyRow = childDiv?.innerText.trim() === '';
/* eslint-disable no-confusing-arrow,no-useless-escape */
const toSentenceCase = (str) => str && typeof str === 'string' ? str.toLowerCase().replace(/(^\s*\w|[\.\!\?]\s*\w)/g, (c) => c.toUpperCase()) : '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: If we're already disabling eslint for this line, do you think we could break it out into multiple lines for better readability?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yep. Good call.
I added the /* eslint-disable-next-line no-useless-escape */ part
(I tested removing those 'useless' escapes and it didn't 'Sentence Case' right so I left that part as is)
I adjusted the arg into a few lines for better readability and fixes 'no-confusing-arrow' clause. :)
Thanks for the feedback

Copy link
Contributor

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried.

@aem-code-sync aem-code-sync bot temporarily deployed to rparrish/share-update March 27, 2024 23:13 Inactive
Copy link
Contributor

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions bot added the Stale label Apr 10, 2024
@aem-code-sync aem-code-sync bot temporarily deployed to rparrish/share-update April 10, 2024 17:22 Inactive
@github-actions github-actions bot removed the Stale label Apr 11, 2024
Copy link
Contributor

This PR is currently in the needs-verification state. Please assign a QA engineer to verify the changes.

@robert-bogos
Copy link
Contributor

Hi @ryanmparrish ! Please do not forget to assign a QA engineer to verify the changes.

@ryanmparrish
Copy link
Contributor Author

@elan-tbx I assigned this to you for a verified label. Thanks

@elan-tbx elan-tbx added verified PR has been E2E tested by a reviewer and removed needs-verification PR requires E2E testing by a reviewer labels Apr 16, 2024
Copy link
Contributor

Reminder to set the Ready for Stage label - to queue this to get merged to stage & production.

@Blainegunn Blainegunn merged commit 9895190 into stage Apr 19, 2024
17 checks passed
@Blainegunn Blainegunn deleted the rparrish/share-update branch April 19, 2024 21:31
mokimo pushed a commit to mokimo/milo that referenced this pull request Apr 30, 2024
…dobecom#2070)

* Check for block content and use as header if exists, updated twitter icon ref

* Refactored to allow for authoring icon discression

* share.test for new custom title, refactored so .inline doesn't have title support

* remove test console

* linting

* eslint adjust better readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Stage run-nala Run Nala Test Automation against PR verified PR has been E2E tested by a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants