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

Fix terms checkbox and gap #1553

Open
wants to merge 2 commits into
base: feat-pink-v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ pnpm run lint

Diagnostic tool that checks for the following:

- Unused CSS
- Svelte A11y hints
- TypeScript compiler errors
- Unused CSS
- Svelte A11y hints
- TypeScript compiler errors

```bash
pnpm run check
Expand All @@ -130,11 +130,11 @@ doc-548-submit-a-pull-request-section-to-contribution-guide

When `TYPE` can be:

- **feat** - is a new feature
- **doc** - documentation only changes
- **cicd** - changes related to CI/CD system
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature
- **feat** - is a new feature
- **doc** - documentation only changes
- **cicd** - changes related to CI/CD system
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature

**All PRs must include a commit message with a description of the changes made!**

Expand Down Expand Up @@ -175,22 +175,22 @@ $ git push origin [name_of_your_new_branch]

Before committing always make sure to run all available tools to improve the codebase:

- Formatter
- `pnpm run format`
- Tests
- `pnpm test`
- Diagnostics
- `pnpm run check`
- Formatter
- `pnpm run format`
- Tests
- `pnpm test`
- Diagnostics
- `pnpm run check`

### Performance

Page load times are a key consideration for users of all browsers and device types.

There are some general things we can do in front-end development:

- Minimize HTTP requests
- Minimize blocking – content should be readable before client-side processing
- Lazy load "supplementary" content, especially images
- Minimize HTTP requests
- Minimize blocking – content should be readable before client-side processing
- Lazy load "supplementary" content, especially images

### Don't Repeat Yourself (DRY)

Expand All @@ -202,12 +202,12 @@ If you stick to this principle, you will ensure that you will only ever need to

Separate _structure_ from _presentation_ from _behavior_ to aid maintainability and understanding.

- Keep CSS (presentation), JS (behavior) and HTML (structure) in the same respective Svelte component
- Avoid writing inline CSS or Javascript in HTML
- Avoid writing CSS or HTML in Javascript
- Don't choose HTML elements to imply style
- Where appropriate, use CSS or Svelte rather than Javascript for animations and transitions
- Try to use templates when defining markup in Javascript
- Keep CSS (presentation), JS (behavior) and HTML (structure) in the same respective Svelte component
- Avoid writing inline CSS or Javascript in HTML
- Avoid writing CSS or HTML in Javascript
- Don't choose HTML elements to imply style
- Where appropriate, use CSS or Svelte rather than Javascript for animations and transitions
- Try to use templates when defining markup in Javascript

### Write code to be read

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

Appwrite Console has been built with the following frameworks:

- [Svelte](https://svelte.dev/)
- [Svelte Kit](https://kit.svelte.dev/)
- [Svelte](https://svelte.dev/)
- [Svelte Kit](https://kit.svelte.dev/)

## Developer Experience

Expand Down
4 changes: 2 additions & 2 deletions src/lib/elements/forms/inputChoice.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
</script>

<label class="choice-item" for={id}>
<div class="choice-item">
<Layout.Stack direction="row" alignItems="flex-start">
{#if type === 'switchbox'}
<Selector.Switch
Expand Down Expand Up @@ -80,7 +80,7 @@
{/if}
</div>
</Layout.Stack>
</label>
</div>
{#if error}
<Helper type="warning">{error}</Helper>
{/if}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ export const load = async ({ params, depends, url, route, parent }) => {
limit,
query,
search,
logs: await sdk.forProject.sites.listLogs(params.site, [
Query.limit(limit),
Query.offset(offset),
Query.orderDesc(''),
...parsedQueries.values()
], search),
site,
logs: await sdk.forProject.sites.listLogs(
params.site,
[
Query.limit(limit),
Query.offset(offset),
Query.orderDesc(''),
...parsedQueries.values()
],
search
),
site
};
};
58 changes: 30 additions & 28 deletions src/routes/(public)/invite/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,37 @@
<Button href={`${base}/register`}>Sign up to Appwrite</Button>
</div>
{:else}
<p class="text">You have been invited to join an organization on Appwrite</p>
<Form onSubmit={acceptInvite}>
<FormList>
<InputChoice
required
bind:value={terms}
id="terms"
label="terms"
showLabel={false}>
By accepting the invitation, you agree to the <a
class="link"
href="https://appwrite.io/terms"
target="_blank"
rel="noopener noreferrer">Terms and Conditions</a>
and
<a
class="link"
href="https://appwrite.io/privacy"
target="_blank"
rel="noopener noreferrer">
Privacy Policy</a
>.</InputChoice>
<div class="u-flex-vertical u-gap-16">
<p class="text">You have been invited to join an organization on Appwrite</p>
<Form onSubmit={acceptInvite}>
<FormList>
<InputChoice
required
bind:value={terms}
id="terms"
label="terms"
showLabel={false}>
By accepting the invitation, you agree to the <a
class="link"
href="https://appwrite.io/terms"
target="_blank"
rel="noopener noreferrer">Terms and Conditions</a>
and
<a
class="link"
href="https://appwrite.io/privacy"
target="_blank"
rel="noopener noreferrer">
Privacy Policy</a
>.</InputChoice>

<div class="u-flex u-main-end u-gap-12">
<Button secondary href={`${base}/login`}>Cancel</Button>
<Button submit>Accept</Button>
</div>
</FormList>
</Form>
<div class="u-flex u-main-end u-gap-12">
<Button secondary href={`${base}/login`}>Cancel</Button>
<Button submit disabled={!terms}>Accept</Button>
</div>
</FormList>
</Form>
</div>
{/if}
</svelte:fragment>
</Unauthenticated>
Loading