Skip to content

Commit ab0f20e

Browse files
committed
Add copy to clipboard component
1 parent 32b398b commit ab0f20e

16 files changed

Lines changed: 668 additions & 89 deletions

File tree

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"Postg",
8585
"postgrest",
8686
"psql",
87+
"pylint",
8788
"qpart",
8889
"qparts",
8990
"Qualys",

_TODO.md

Lines changed: 59 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -69,60 +69,9 @@ If we want to make it feel less inconsistent, we could either (a) rename `_logge
6969
- CallToAction/Newsletter
7070
- ContactForm
7171

72-
## Mobile Social Shares UI
73-
74-
See the example image in Social Shares. The social shares UI on mobile should be a modal that slides in from the bottom.
75-
76-
## Performance
77-
78-
Implement mitigations in test/e2e/specs/07-performance/PERFORMANCE.md
79-
80-
## Analytics
81-
82-
Vercel Analytics
83-
84-
- Highlighter component
85-
- Social Shares component
86-
- Social Embeds: Track embed interactions
87-
- Cookie Consent
88-
- Download Form component
89-
90-
npm i @vercel/analytics
91-
import Analytics from '@vercel/analytics/astro'
92-
https://vercel.com/docs/analytics/quickstart#add-the-analytics-component-to-your-app
93-
94-
## Themepicker tooltips, extra themes
95-
96-
- Add additional themes
97-
- Add tooltip that makes use of the description field for the theme, explaining what the intent of the theme is
98-
99-
## Sentry feedback, chat bot tying into my phone and email
100-
101-
See note in src/components/scripts/sentry/client.ts - "User Feedback - allow users to report issues"
102-
103-
https://vercel.com/kevin-browns-projects-dd474f73/astro-webstackbuilders-com/ai-gateway
104-
105-
## Uppy file uploads from contact form
106-
107-
docs/CONTACT_FORM.md
72+
## Refactor Theme Colors
10873

109-
Where to upload to?
110-
111-
## Search
112-
113-
Add Upstash Search as a Vercel Marketplace Integration.
114-
115-
Lunr is a JS search library using an inverted index. Client-side search for statically hosted pages.
116-
117-
### [`@jackcarey/astro-lunr`](https://www.npmjs.com/package/@jackcarey/astro-lunr)
118-
119-
### [`@siverv/astro-lunr`](https://www.npmjs.com/package/@siverv/astro-lunr)
120-
121-
## Email Templates
122-
123-
Right now we're using string literals to define HTML email templates for site mails. We should use Nunjucks with the rule-checking for valid CSS in HTML emails like we have in the corporate email footer repo.
124-
125-
## Color vars
74+
### Color vars
12675

12776
brand primary: #001733
12877
brand secondary: #0062B6
@@ -132,7 +81,9 @@ accent
13281

13382
text-white, other default Tailwind colors
13483

135-
## Files with Skipped Tests
84+
## Refactor E2E Test Suite
85+
86+
### Files with Skipped Tests
13687

13788
Blocked Categories (44 tests):
13889

@@ -141,7 +92,7 @@ Lighthouse audits (6) - Integration pending
14192
Newsletter double opt-in (6) - Email testing infrastructure
14293
Axe accessibility (2) - axe-core integration
14394

144-
## Axe tags
95+
### Axe tags
14596

14697
cat.aria: Rules related to Accessible Rich Internet Applications (ARIA) attributes and roles.
14798
cat.color: Rules related to color contrast and meaning conveyed by color.
@@ -165,20 +116,6 @@ Needs to add real API key and test
165116
- (Optional) Set up Bridgy for social media
166117
- Test with sample webmentions
167118

168-
## Custom Directives
169-
170-
[`astro-directives`](https://github.com/QuentinDutot/astro-directives)
171-
172-
```react
173-
<Component client:hover />
174-
```
175-
176-
| Attribute | Load the javascript and hydrate on ... |
177-
| ------------- | -------------------------------------- |
178-
| client:click | element click event |
179-
| client:hover | element mouseover event |
180-
| client:scroll | window scroll event |
181-
182119
## Prefetch Links
183120

184121
The default prefetch strategy when adding the data-astro-prefetch attribute is hover. To change it, you can configure prefetch.defaultStrategy in your astro.config.mjs file.
@@ -212,6 +149,59 @@ You can then opt-out of prefetching for individual links by setting data-astro-p
212149
<a href="/about" data-astro-prefetch="false">About</a>
213150
```
214151

152+
## Mobile Social Shares UI
153+
154+
See the example image in Social Shares. The social shares UI on mobile should be a modal that slides in from the bottom.
155+
156+
## Performance
157+
158+
Implement mitigations in test/e2e/specs/07-performance/PERFORMANCE.md
159+
160+
## Analytics
161+
162+
Vercel Analytics
163+
164+
- Highlighter component
165+
- Social Shares component
166+
- Social Embeds: Track embed interactions
167+
- Cookie Consent
168+
- Download Form component
169+
170+
npm i @vercel/analytics
171+
import Analytics from '@vercel/analytics/astro'
172+
https://vercel.com/docs/analytics/quickstart#add-the-analytics-component-to-your-app
173+
174+
## Themepicker tooltips, extra themes
175+
176+
- Add additional themes
177+
- Add tooltip that makes use of the description field for the theme, explaining what the intent of the theme is
178+
179+
## Sentry feedback, chat bot tying into my phone and email
180+
181+
See note in src/components/scripts/sentry/client.ts - "User Feedback - allow users to report issues"
182+
183+
https://vercel.com/kevin-browns-projects-dd474f73/astro-webstackbuilders-com/ai-gateway
184+
185+
## Uppy file uploads from contact form
186+
187+
docs/CONTACT_FORM.md
188+
189+
Where to upload to?
190+
191+
## Search
192+
193+
Add Upstash Search as a Vercel Marketplace Integration.
194+
195+
Lunr is a JS search library using an inverted index. Client-side search for statically hosted pages.
196+
197+
### [`@jackcarey/astro-lunr`](https://www.npmjs.com/package/@jackcarey/astro-lunr)
198+
199+
### [`@siverv/astro-lunr`](https://www.npmjs.com/package/@siverv/astro-lunr)
200+
201+
## Email Templates
202+
203+
Right now we're using string literals to define HTML email templates for site mails. We should use Nunjucks with the rule-checking for valid CSS in HTML emails like we have in the corporate email footer repo.
204+
215205
## Astro Components to Add
216206

217207
### "Add to Calendar" button
@@ -221,14 +211,6 @@ Google Calendar, Apple Calendar, Yahoo Calender, Microsoft 365, Outlook, and T
221211
`https://github.com/add2cal/add-to-calendar-button`
222212
`https://add-to-calendar-button.com/`
223213

224-
### Astro wrapper for the `@github/clipboard-copy-element` web component. Copies element text content or input values to the clipboard
225-
226-
[`clipboard-copy`](https://github.com/BryceRussell/astro-github-elements/tree/main/packages/clipboard-copy#astro-github-elementsclipboard-copy)
227-
228-
### Astro wrapper for GitHub's relative time web component. Translates dates to past or future time phrases, like "*4 hours from now*" or "*20 days ago*"
229-
230-
[Relative Time](https://github.com/BryceRussell/astro-github-elements/tree/main/packages/time#readme)
231-
232214
## Markdown
233215

234216
## Code Block and Highlighting

astro.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AstroPWA from '@vite-pwa/astro'
22
import db from '@astrojs/db'
3+
import directives from 'astro-directives'
34
import icon from 'astro-icon'
45
import linkValidator from 'astro-link-validator'
56
import lit from '@semantic-ui/astro-lit'
@@ -51,6 +52,9 @@ const standardIntegrations = [
5152
/** Astro DB - uses Tursa for backing store in production */
5253
db(),
5354
...sharedTestIntegrations,
55+
/**
56+
* Adds client:click, client:hover, and client:scroll custom client directives for components */
57+
directives(),
5458
mdx(markdownConfig),
5559
/** Generate favicons and PWA icons from source SVG */
5660
faviconGenerator(),

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"lint:actions": "FORCE_COLOR=1 npx node-actionlint && FORCE_COLOR=1 python3 -m pylint $(find .github/actions -type f -path '*/src/*.py')",
4545
"lint:code": "npx eslint \"@types/**/*.{js,ts}\" \"src/**/*.{js,ts,tsx,astro}\" \"test/**/*.{js,ts,tsx,astro}\"",
4646
"lint:inclusive-language": "npx alex src/content",
47-
"lint:json": "FORCE_COLOR=1 npx prettier '**/*.json' --cache --ignore-path .gitignore",
47+
"lint:json": "FORCE_COLOR=1 npx prettier \"**/*.json\" --cache --check --ignore-path .gitignore --ignore-path .prettierignore",
4848
"lint:md": "FORCE_COLOR=1 npx markdownlint-cli2 \"**/*.{md,mdx}\" \"!**/node_modules/**\" \"!**/dist/**\" \"!**/.astro/**\" \"!**/dev-dist/**\" \"!**/__blobstorage__/**\"",
4949
"lint:style": "FORCE_COLOR=1 npx stylelint \"src/**/*.{css,astro}\"",
5050
"lint:tsc:check": "npm run sync && tsc --noEmit -p tsconfig.json --pretty false",
@@ -102,6 +102,7 @@
102102
"@vite-pwa/astro": "^1.2.0",
103103
"@webcomponents/template-shadowroot": "^0.2.1",
104104
"astro": "5.16.6",
105+
"astro-directives": "^1.0.7",
105106
"astro-icon": "^1.1.5",
106107
"astro-link-validator": "github:rodgtr1/astro-link-validator",
107108
"astro-og-canvas": "^0.7.2",

0 commit comments

Comments
 (0)