Skip to content

Commit

Permalink
Svelte5 (#25)
Browse files Browse the repository at this point in the history
* upgrade deps

* fix

* lint and format

* fix lint

* migrate

* refactor

* migrate

* migrate

* refactor

* refactor

* refactor, fixes, uses hellocoop helper browser package

* fix

* fixes

* fix

* refactor

* fixes

* refactor, fixes

* refactor

* cleanup

* refactor

* fixes

* format

* fix

* migrate from stores

* fix

* 2025.1.0

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
rohanharikr and github-actions[bot] authored Jan 21, 2025
1 parent 6b90142 commit 01b7bb6
Show file tree
Hide file tree
Showing 36 changed files with 7,457 additions and 3,966 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Sync content with S3 Beta
on:
workflow_dispatch:
pull_request_target:
types: [ closed ]
branches: [ beta ]
types: [closed]
branches: [beta]

jobs:
sync:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
uses: hellocoop/tools/.github/workflows/code-deploy-client.yml@main
with:
AWS_ACCOUNT: ${{ vars.HELLO_BETA_AWS }} # set at org level
AWS_ACCOUNT: ${{ vars.HELLO_BETA_AWS }} # set at org level
STACK: QuickstartStack
BUILD_CMD: npm run build
TARGET: beta
DOMAIN: quickstart.hello-beta.net # for version comparison
BUILD_DIR: ./S3
BUILD_DIR: ./S3
8 changes: 4 additions & 4 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Sync content with S3 Staging
on:
workflow_dispatch: # for testing / manually running workflows via github ui
pull_request_target: # pr targeting main was closed -- we check merge status in stage_check job below
types: [ closed ]
branches: [ main ]
types: [closed]
branches: [main]

jobs:
stage_check: # only stage if pr was merged with main or workflow triggered manually
Expand All @@ -20,9 +20,9 @@ jobs:
needs: stage_check
uses: hellocoop/tools/.github/workflows/code-deploy-client.yml@main
with:
AWS_ACCOUNT: ${{ vars.HELLO_STAGING_AWS }} # set at org level
AWS_ACCOUNT: ${{ vars.HELLO_STAGING_AWS }} # set at org level
STACK: QuickstartStack
WORKING_DIR: .
TARGET: main
DOMAIN: quickstart.hello-staging.net # for version comparison
BUILD_DIR: ./S3
BUILD_DIR: ./S3
8 changes: 4 additions & 4 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Increment version

on:
pull_request_target:
types: [ opened, synchronize ] #Runs on PR creation/updation
branches: [ main ]
types: [opened, synchronize] #Runs on PR creation/updation
branches: [main]

jobs:
jobs:
version:
uses: hellocoop/tools/.github/workflows/code-version.yml@main
uses: hellocoop/tools/.github/workflows/code-version.yml@main
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist
node_modules
S3
cypress
rumTracker.js
playwright-report
test-results
21 changes: 21 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte",
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"]
}
},
{
"files": "content/**/*.{css,html,js,svelte}",
"options": {
"requirePragma": true
}
}
]
}
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repo contains the source code powering [https://quickstart.hello.coop/](htt

Quickstart accelerates getting up and running with Hellō. It will read an existing client_id, or create one.

The Quickstart SPA (Single Page App) is launched by sample apps to acquire a client_id. The developer will log into Hellō and authorize Quickstart to create / read publisher / apps.
The Quickstart SPA (Single Page App) is launched by sample apps to acquire a client_id. The developer will log into Hellō and authorize Quickstart to create / read publisher / apps.

## Launching Quickstart

Expand Down Expand Up @@ -32,15 +32,12 @@ On completion, the Quickstart app will load the `response_uri` with `client_id`

http://localhost:8000/quickstart?client_id=9ca12f47-f310-413b-b70f-4428d9448e8d


## Quickstart Developer Experience

If the developer has not registered any applications, they will be prompted with a Publisher Name "John Smith's Team" and an Application Name "John Smith's Application". If a `suffix` is provided (eg. "Next.js"), then the prompt will be "John Smith's Next.js". Alternatively, the developer will choose an existing application or create a new one with the same prefilled prompt.



## Sample App Response Developer Experience

If possible, the sample app will have a link to test out the sample app, as well as inform the developer that they can update their Hellō application at https://console.hello.coop

[MIT](LICENSE)
[MIT](LICENSE)
61 changes: 61 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';

/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
__NAME__: 'readonly',
__VERSION__: 'readonly',
__GITHUBURL__: 'readonly',
__SVELTEVERSION__: 'readonly',
__VITEVERSION__: 'readonly',
__TAILWINDCSSVERSION__: 'readonly'
}
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
svelteFeatures: {
experimentalGenerics: true
}
}
}
},
{
ignores: [
'.vercel/',
'src/routes/utils/highlight/',
'build/',
'.svelte-kit/',
'dist/',
'S3/',
'test-results/',
'*.md',
'src/**/*/Setup.svelte',
'node_modules/',
'cypress',
'rumTracker.js',
'assets/',
'playwright-report/'
]
},
{
rules: {
// Note: you must disable the base rule as it can report incorrect errors
// "no-unused-vars": "off",
'svelte/no-at-html-tags': 'off'
}
}
];
121 changes: 95 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,99 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="https://cdn.hello.coop/images/quickstart-favicon-dark.png" />
<link rel="stylesheet" href="https://cdn.hello.coop/css/hello-button.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hellō Quickstart</title>
<!-- integrity is hard coded here because this file only exists in staging/prod -->
<script defer="" data-domain="quickstart.hello.coop" src="/js/script.hash.js" integrity="sha384-1kvlsmFV0In+ocTgJBWUSDEyMwHcxFD7WzKbrYYq7A6iJAOLn2idnchzq+mxbS3M" crossorigin="anonymous"></script>
<style>
@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}
<head>
<meta charset="UTF-8" />
<meta name="theme-color" content="#303030" />
<link
href="https://cdn.hello.coop/images/quickstart-favicon-light.png"
rel="icon"
media="(prefers-color-scheme: light)"
/>
<link
href="https://cdn.hello.coop/images/quickstart-favicon-dark.png"
rel="icon"
media="(prefers-color-scheme: dark)"
/>
<link rel="stylesheet" href="https://cdn.hello.coop/css/hello-button.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hellō Quickstart</title>
<!-- integrity is hard coded here because this file only exists in staging/prod -->
<script
defer=""
data-domain="quickstart.hello.coop"
src="/js/script.hash.js"
integrity="sha384-1kvlsmFV0In+ocTgJBWUSDEyMwHcxFD7WzKbrYYq7A6iJAOLn2idnchzq+mxbS3M"
crossorigin="anonymous"
></script>
<style type="text/css">
html,
body {
height: 100%;
min-width: 320px;
overflow-x: auto;
}
@media (prefers-color-scheme: light) {
html {
color-scheme: light;
}

.spinner {
position: absolute;
left: 50%;
top: 50%;
height: 40px;
width: 40px;
margin: -26px 0 0 -26px;
box-sizing: content-box;
animation: rotation 1s infinite linear;
border-width: 6px;
border-style: solid;
border-radius: 100%;
}
</style>
</head>
<body class="bg-white dark:bg-[#151515] text-charcoal dark:text-[#d4d4d4]">
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script defer src="/assets/quickstart-glob.js"></script>
<script defer src="/assets/hello-dev-wc-footer.js"></script>
</body>

#spinner {
height: 3.2rem;
width: 3.2rem;
animation: rotation 1s linear infinite;
}

@keyframes rotation {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);
}
}

@media (prefers-color-scheme: dark) {
body {
color: #d4d4d4;
background: #151515;
color-scheme: dark;
}

.spinner {
border-color: rgba(116, 116, 116, 0.3);
border-top-color: rgb(116, 116, 116);
}
}

@media (prefers-color-scheme: light) {
body {
color: #303030;
background: white;
color-scheme: light;
}

.spinner {
border-color: rgba(75, 75, 75, 0.3);
border-top-color: rgb(75, 75, 75);
}
}
</style>
</head>
<body class="bg-white dark:bg-[#151515] text-charcoal dark:text-[#d4d4d4]">
<div id="load-spinner" class="spinner"></div>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script defer src="/assets/quickstart-glob.js"></script>
<script defer src="/assets/hello-dev-wc-footer.js"></script>
</body>
</html>
Loading

0 comments on commit 01b7bb6

Please sign in to comment.