Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Add Files, Clipboard, and first Advanced Apps Patterns#7645

Merged
tomayac merged 70 commits intomainfrom
howto-patterns
Oct 10, 2022
Merged

Add Files, Clipboard, and first Advanced Apps Patterns#7645
tomayac merged 70 commits intomainfrom
howto-patterns

Conversation

@tomayac
Copy link
Copy Markdown
Member

@tomayac tomayac commented Apr 5, 2022

Fixes #7439

Changes proposed in this pull request:

  • Add Files and Clipboard Patterns

@tomayac tomayac added DO NOT MERGE Actively working on but experimental $-presubmit Add label to run presubmit tests. labels Apr 5, 2022
@tomayac tomayac requested a review from devnook April 5, 2022 13:03
@github-actions github-actions bot removed the $-presubmit Add label to run presubmit tests. label Apr 5, 2022
@tomayac tomayac requested a review from rachelandrew April 5, 2022 13:04
@tomayac tomayac added the $-presubmit Add label to run presubmit tests. label Apr 5, 2022
@github-actions github-actions bot removed the $-presubmit Add label to run presubmit tests. label Apr 5, 2022
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 5, 2022

Deploy Preview for web-dev-staging ready!

Name Link
🔨 Latest commit d9a5891
🔍 Latest deploy log https://app.netlify.com/sites/web-dev-staging/deploys/6340086998d11d00075047ad
😎 Deploy Preview https://deploy-preview-7645--web-dev-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@chrome-devrel-review-bot
Copy link
Copy Markdown
Collaborator

chrome-devrel-review-bot commented Apr 22, 2022

Hello! This is an automated review by our custom reviewbot. It updates automatically when code or GitHub comments in this pull request are created or updated.

Requested changes

If there are any common problems with the content files you created or modified, they will be listed here.

src/site/content/en/patterns/advanced-apps/audio-effects/index.md

  • Please put a blank line before and after each section heading. Some Markdown parsers don't detect the text as a section heading unless there is blank space before and after it. Affected lines: 12, 16, 48

src/site/content/en/patterns/advanced-apps/badges/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/advanced-apps/contacts/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/advanced-apps/contacts/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/advanced-apps/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/advanced-apps/multiple-screens/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/advanced-apps/periodic-background-sync/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/advanced-apps/share/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/advanced-apps/shortcuts/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/copy-images/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/copy-images/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/copy-text/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/copy-text/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/paste-files/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/paste-files/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/paste-images/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/paste-images/index.md

  • Please put a blank line before and after each section heading. Some Markdown parsers don't detect the text as a section heading unless there is blank space before and after it. Affected lines: 87

src/site/content/en/patterns/clipboard/paste-text/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/clipboard/paste-text/index.md

  • Please put a blank line before and after each section heading. Some Markdown parsers don't detect the text as a section heading unless there is blank space before and after it. Affected lines: 66

src/site/content/en/patterns/files/drag-and-drop-directories/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/drag-and-drop-directories/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/drag-and-drop-files/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/drag-and-drop-files/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/handle-files-opened-from-the-file-explorer/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/open-a-directory/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/open-a-directory/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/open-one-or-multiple-files/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/open-one-or-multiple-files/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/receive-shared-files/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/save-a-file/demo.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/save-a-file/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/files/share-files/index.md

  • This file passed all of our automated Markdown audits.

src/site/content/en/patterns/example-set/index.md

  • This file passed all of our automated Markdown audits.

@tomayac
Copy link
Copy Markdown
Member Author

tomayac commented May 18, 2022

Hi @devnook,

In 8b7b2f7, I have now reflected your changes from #7875; and it almost works. Since the service worker lives in assets/sw.js, I cannot broaden its scope unfortunately:

const registration = await navigator.serviceWorker.register(
'assets/sw.js', {
scope: '.',
}
);

Screen Shot 2022-05-18 at 13 04 34

Any idea? Can we somehow smuggle sw.js one folder level up?

@devnook
Copy link
Copy Markdown
Contributor

devnook commented May 18, 2022

Hi @devnook,

In 8b7b2f7, I have now reflected your changes from #7875; and it almost works. Since the service worker lives in assets/sw.js, I cannot broaden its scope unfortunately:

const registration = await navigator.serviceWorker.register(
'assets/sw.js', {
scope: '.',
}
);

Screen Shot 2022-05-18 at 13 04 34

Any idea? Can we somehow smuggle sw.js one folder level up?

I suggest you just move sw.js up a level to badges/sw.js and update the path in index.md static field. If you still want to have it displayed in the code tabs, then probably you'd need to repeat it in assets/ directory too. Let me know if it worked this way!

@tomayac tomayac changed the title Add Files and Clipboard Patterns Add Files, Clipboard, and first Advanced Apps Patterns May 19, 2022
@tomayac tomayac marked this pull request as ready for review October 3, 2022 10:37
Copy link
Copy Markdown
Member

@beaufortfrancois beaufortfrancois left a comment

Choose a reason for hiding this comment

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

LGTM! You may want to edit all of date: to today.

Co-authored-by: François Beaufort <beaufort.francois@gmail.com>
@tomayac tomayac removed the DO NOT MERGE Actively working on but experimental label Oct 5, 2022
Copy link
Copy Markdown
Collaborator

@rachelandrew rachelandrew left a comment

Choose a reason for hiding this comment

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

Approved with some very small styleguide nits.

tomayac and others added 2 commits October 7, 2022 12:53
Co-authored-by: Rachel Andrew <rachelandrew@google.com>
@tomayac
Copy link
Copy Markdown
Member Author

tomayac commented Oct 7, 2022

@devnook Could you flip the eng LGTM approval bit for src/lib/patterns.js, which makes sure the "CodePen" doesn't show images?

@tomayac tomayac requested a review from devnook October 7, 2022 11:27
@tomayac
Copy link
Copy Markdown
Member Author

tomayac commented Oct 7, 2022

Thank you all! I will merge this on Monday! Adding the Do Not Merge label in between.

@tomayac tomayac added the DO NOT MERGE Actively working on but experimental label Oct 7, 2022
@tomayac tomayac merged commit 0847ab1 into main Oct 10, 2022
@tomayac tomayac deleted the howto-patterns branch October 10, 2022 06:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

content Issues related to content DO NOT MERGE Actively working on but experimental

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fugu][PWA] How to? series [6/30/2022]

6 participants