Skip to content

Add messaging overview route #596

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

Merged
merged 59 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a99082e
Add messaging overview route
stnguyen90 Oct 20, 2023
7532b8e
Update input elments to support popovers
stnguyen90 Nov 20, 2023
c99ea5b
Add messaging providers route
stnguyen90 Oct 24, 2023
16cc918
Add wizard for creating provider
stnguyen90 Oct 26, 2023
c8ef515
Add wizard for updating provider
stnguyen90 Dec 1, 2023
bb705cb
Add provider details route
stnguyen90 Oct 25, 2023
ae8da6a
Refactor providers table and add bulk deletion
stnguyen90 Dec 14, 2023
37a5d11
Update InputCheckbox to properly show label and description
stnguyen90 Nov 28, 2023
cd7e824
Update InputRadio to properly show label and description
stnguyen90 Nov 28, 2023
5ef5986
Create InputDate for only dates
stnguyen90 Nov 29, 2023
2670752
Create InputTime for only times
stnguyen90 Nov 29, 2023
8b953d4
Add a modal for selecting user targets
stnguyen90 Nov 30, 2023
96dc961
Create a wizard to send email messages
stnguyen90 Nov 29, 2023
fdb7dd1
Add a message detail page for email messages
stnguyen90 Nov 30, 2023
80e81b1
Update create message wizard to support SMS
stnguyen90 Nov 30, 2023
ff42635
Update message detail to show SMS preview
stnguyen90 Nov 30, 2023
e58a45c
Update create message wizard to support push
stnguyen90 Dec 1, 2023
f92dfce
Update message detail to show push preview
stnguyen90 Dec 1, 2023
f2313e3
Add messaging topics route
stnguyen90 Oct 20, 2023
ca67473
Implmement create topic modal
stnguyen90 Oct 30, 2023
5856b51
Add topic detail route
stnguyen90 Oct 30, 2023
ece8ec7
Add subscribers list route
stnguyen90 Nov 1, 2023
dbad10b
Add support for adding a subscriber to a topic
stnguyen90 Dec 5, 2023
8e789b6
Update the create message wizard to support topics
stnguyen90 Dec 6, 2023
9b84ea5
Refactor topics table and add bulk delete
stnguyen90 Dec 14, 2023
842da80
Add description to topics table and details
stnguyen90 Dec 15, 2023
fee8e9c
Add topic activity page
stnguyen90 Dec 15, 2023
26db45d
Update push preview to look like a mobile device
stnguyen90 Dec 6, 2023
48babe9
Update SMS preview to look like a mobile device
stnguyen90 Dec 12, 2023
cfcf17f
Fix export of the Filters component
stnguyen90 Dec 14, 2023
03852e1
Create a component to handle 0 results from filtering
stnguyen90 Dec 14, 2023
4158a8a
Allow controlling whether a column should be filterable
stnguyen90 Dec 14, 2023
604b323
Update tables to show EmptyFilter if filter returns 0 results
stnguyen90 Dec 14, 2023
bc35253
Update filterable columns on subscribers table
stnguyen90 Dec 14, 2023
c130820
Fix alignment of create message/provider dropdowns
stnguyen90 Dec 19, 2023
81ddc61
Fix the order create message/provider drop items
stnguyen90 Dec 19, 2023
8008e58
Merge pull request #665 from appwrite/fix-messaging-design-review
TorstenDittmann Jan 2, 2024
8530a2a
Merge pull request #654 from appwrite/feat-filters
TorstenDittmann Jan 2, 2024
5a67888
Update input elments to support popovers
stnguyen90 Nov 20, 2023
08d67f7
Add messaging providers route
stnguyen90 Oct 24, 2023
f825b39
Add wizard for creating provider
stnguyen90 Oct 26, 2023
476f08a
Add wizard for updating provider
stnguyen90 Dec 1, 2023
c9a2e65
Add provider details route
stnguyen90 Oct 25, 2023
cab99c6
Refactor providers table and add bulk deletion
stnguyen90 Dec 14, 2023
60e9706
Update src/routes/console/project-[project]/messaging/providers/updat…
TorstenDittmann Jan 2, 2024
24bd1dd
Update src/routes/console/project-[project]/messaging/providers/wizar…
TorstenDittmann Jan 2, 2024
bc9c899
Update src/routes/console/project-[project]/messaging/providers/provi…
TorstenDittmann Jan 2, 2024
a532cb8
Merge branch 'feat-messaging-overview' into feat-messaging-create-mes…
TorstenDittmann Jan 2, 2024
844535a
fix: ci
TorstenDittmann Jan 2, 2024
6696e59
Merge branch 'feat-messaging-create-message' of https://github.com/ap…
TorstenDittmann Jan 2, 2024
a926621
Merge pull request #630 from appwrite/feat-messaging-create-message
TorstenDittmann Jan 2, 2024
80d3c00
Merge pull request #632 from appwrite/feat-messaging-message-detail
TorstenDittmann Jan 2, 2024
6a39aaa
Update src/routes/console/project-[project]/messaging/wizard/smsFormL…
TorstenDittmann Jan 2, 2024
f9931d2
Update src/routes/console/project-[project]/messaging/wizard/step1.sv…
TorstenDittmann Jan 2, 2024
c096073
Merge pull request #633 from appwrite/feat-messaging-create-sms-message
TorstenDittmann Jan 2, 2024
ea3c866
Merge branch 'feat-messaging-overview' into feat-messaging-create-pus…
TorstenDittmann Jan 2, 2024
7669ad7
Merge pull request #636 from appwrite/feat-messaging-create-push-message
TorstenDittmann Jan 2, 2024
6b371da
Merge pull request #597 from appwrite/feat-messaging-topics
TorstenDittmann Jan 2, 2024
e6f1846
Merge pull request #643 from appwrite/feat-messaging-push-preview
TorstenDittmann Jan 2, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
# - name: Audit dependencies
# run: npm audit --audit-level low
- name: Audit dependencies
run: npm audit --audit-level low
- name: Install dependencies
run: npm ci
- name: Svelte Diagnostics
Expand Down
13 changes: 12 additions & 1 deletion src/lib/actions/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,16 @@ export enum Submit {
SmsResetTemplate = 'submit_sms_reset_template',
SmsUpdateInviteTemplate = 'submit_sms_update_invite_template',
SmsUpdateLoginTemplate = 'submit_sms_update_login_template',
SmsUpdateVerificationTemplate = 'submit_sms_update_verification_template'
SmsUpdateVerificationTemplate = 'submit_sms_update_verification_template',
MessagingProviderCreate = 'submit_messaging_provider_create',
MessagingProviderDelete = 'submit_messaging_provider_delete',
MessagingProviderUpdate = 'submit_messaging_provider_update',
MessagingMessageCreate = 'submit_messaging_message_create',
MessagingMessageDelete = 'submit_messaging_message_delete',
MessagingTopicCreate = 'submit_messaging_topic_create',
MessagingTopicDelete = 'submit_messaging_topic_delete',
MessagingTopicUpdateName = 'submit_messaging_topic_update_name',
MessagingTopicUpdateDescription = 'submit_messaging_topic_update_description',
MessagingTopicSubscriberAdd = 'submit_messaging_topic_subscriber_add',
MessagingTopicSubscriberDelete = 'submit_messaging_topic_subscriber_delete'
}
1 change: 1 addition & 0 deletions src/lib/commandCenter/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const groups = [
'platforms',
'databases',
'functions',
'messaging',
'storage',
'domains',
'webhooks',
Expand Down
7 changes: 6 additions & 1 deletion src/lib/components/drop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
export let noStyle = false;
export let fullWidth = false;
export let fixed = false;
export let display = 'block';

const dispatch = createEventDispatcher<{
blur: undefined;
Expand Down Expand Up @@ -100,7 +101,11 @@

<svelte:window on:click={onBlur} on:keydown={onKeyDown} />

<div class:drop-wrapper={!noStyle} class:u-cross-child-start={childStart} bind:this={element}>
<div
class:drop-wrapper={!noStyle}
class:u-cross-child-start={childStart}
bind:this={element}
style:display>
<slot />
</div>

Expand Down
26 changes: 26 additions & 0 deletions src/lib/components/emptyFilter.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script lang="ts">
import { Button } from '$lib/elements/forms';
import { EmptySearch } from '.';
import { queries } from './filters';

export let resource;
</script>

<EmptySearch hidePages>
<div class="common-section">
<div class="u-text-center common-section">
<b class="body-text-2 u-bold">Sorry, we couldn't find any {resource}.</b>
<p>There are no {resource} that match your filters.</p>
</div>
<div class="u-flex common-section u-main-center">
<Button
secondary
on:click={() => {
queries.clearAll();
queries.apply();
}}>
Clear filters
</Button>
</div>
</div>
</EmptySearch>
10 changes: 6 additions & 4 deletions src/lib/components/filters/content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@
<div class="selects u-flex u-gap-8 u-margin-block-start-16">
<InputSelect
id="column"
options={$columns.map((c) => ({
label: c.title,
value: c.id
}))}
options={$columns
.filter((c) => c.filter !== false)
.map((c) => ({
label: c.title,
value: c.id
}))}
placeholder="Select column"
bind:value={columnId} />
<InputSelect
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/filters/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as filters } from './filters.svelte';
export { default as Filters } from './filters.svelte';
export { hasPageQueries, queryParamToMap, queries } from '$lib/components/filters/store';
1 change: 1 addition & 0 deletions src/lib/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export { default as UploadBox } from './uploadBox.svelte';
export { default as List } from './list.svelte';
export { default as ListItem } from './listItem.svelte';
export { default as Empty } from './empty.svelte';
export { default as EmptyFilter } from './emptyFilter.svelte';
export { default as EmptySearch } from './emptySearch.svelte';
export { default as Drop } from './drop.svelte';
export { default as DropList } from './dropList.svelte';
Expand Down
10 changes: 10 additions & 0 deletions src/lib/components/labelCard.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<script lang="ts">
import { tooltip } from '$lib/actions/tooltip';
import { app } from '$lib/stores/app';
import { base } from '$app/paths';

export let name: string;
export let group: string;
export let value: string | number | boolean;
export let disabled = false;
export let padding = 1;
export let icon: string = null;
export let imageIcon: string = null;
export let fullHeight = true;
export let borderRadius: 'xsmall' | 'small' | 'medium' | 'large' = 'small';
export let backgroundColor: string = null;
Expand Down Expand Up @@ -58,5 +61,12 @@
<span class={`icon-${icon} u-margin-inline-start-auto`} aria-hidden="true" />
{/if}
{/if}
{#if imageIcon}
<img
class="u-margin-inline-start-auto"
style:--p-text-size="1.25rem"
src={`${base}/icons/${$app.themeInUse}/color/${imageIcon}.svg`}
alt={imageIcon} />
{/if}
</div>
</label>
8 changes: 7 additions & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ export enum Dependencies {
MIGRATIONS = 'dependency:migrations',
COLLECTIONS = 'dependency:collections',
RUNTIMES = 'dependency:runtimes',
CONSOLE_VARIABLES = 'dependency:console_variables'
CONSOLE_VARIABLES = 'dependency:console_variables',
MESSAGING_PROVIDERS = 'dependency:messaging_providers',
MESSAGING_PROVIDER = 'dependency:messaging_provider',
MESSAGING_MESSAGE = 'dependency:messaging_message',
MESSAGING_TOPICS = 'dependency:messaging_topics',
MESSAGING_TOPIC = 'dependency:messaging_topic',
MESSAGING_TOPIC_SUBSCRIBERS = 'dependency:messaging_topic_subscribers'
}

export const scopes: {
Expand Down
1 change: 1 addition & 0 deletions src/lib/elements/forms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ export { default as Label } from './label.svelte';
export { default as InputProjectId } from './inputProjectId.svelte';
export { default as InputDate } from './inputDate.svelte';
export { default as InputDateRange } from './inputDateRange.svelte';
export { default as InputTime } from './inputTime.svelte';
46 changes: 22 additions & 24 deletions src/lib/elements/forms/inputCheckbox.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<script lang="ts">
import { FormItem, Helper, Label } from '.';
import { FormItem, Helper } from '.';
import type { FormItemTag } from './formItem.svelte';

interface $$Props extends Partial<HTMLLabelElement> {
id: string;
label?: string;
optionalText?: string;
tooltip?: string;
showLabel?: boolean;
checked?: boolean;
required?: boolean;
disabled?: boolean;
Expand All @@ -26,7 +23,6 @@
export let disabled = false;
export let element: HTMLInputElement | undefined = undefined;
export let wrapperTag: FormItemTag = 'li';

let error: string;

const handleInvalid = (event: Event) => {
Expand All @@ -44,25 +40,27 @@
</script>

<FormItem tag={wrapperTag}>
{#if label}
<Label {required} {tooltip} {optionalText} hide={!showLabel} for={id}>
{label}
</Label>
{/if}

<div class="input-text-wrapper">
<input
{id}
{disabled}
{required}
{...$$restProps}
type="checkbox"
bind:this={element}
bind:checked
on:invalid={handleInvalid}
on:click
on:change />
</div>
<label class="choice-item" for={id}>
<div class="input-text-wrapper">
<input
{id}
{disabled}
{required}
{...$$restProps}
type="checkbox"
bind:this={element}
bind:checked
on:invalid={handleInvalid}
on:click
on:change />
</div>
<div class="choice-item-content">
{#if label}
<div class="choice-item-title">{label}</div>
{/if}
<slot name="description" />
</div>
</label>
{#if error}
<Helper type="warning">{error}</Helper>
{/if}
Expand Down
4 changes: 4 additions & 0 deletions src/lib/elements/forms/inputDate.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
export let value = '';
export let required = false;
export let nullable = false;
export let min: string | number | undefined = undefined;
export let max: string | number | undefined = undefined;
export let disabled = false;
export let readonly = false;
export let autofocus = false;
Expand Down Expand Up @@ -65,6 +67,8 @@
{readonly}
{required}
step=".001"
{min}
{max}
autocomplete={autocomplete ? 'on' : 'off'}
type="date"
class="input-text"
Expand Down
23 changes: 22 additions & 1 deletion src/lib/elements/forms/inputDomain.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { onMount } from 'svelte';
import { FormItem, Helper, Label } from '.';
import { Drop } from '$lib/components';

export let label: string;
export let showLabel = true;
Expand All @@ -19,6 +20,7 @@

let element: HTMLInputElement;
let error: string;
let show = false;

onMount(() => {
if (element && autofocus) {
Expand Down Expand Up @@ -48,7 +50,26 @@

<FormItem>
<Label {required} hide={!showLabel} for={id}>
{label}
{label}{#if $$slots.popover}
<Drop bind:show display="inline-block">
<!-- TODO: make unclicked icon greyed out and hover and clicked filled -->
&nbsp;<button
type="button"
on:click={() => (show = !show)}
class="tooltip"
aria-label="input tooltip">
<span
class="icon-info"
aria-hidden="true"
style="font-size: var(--icon-size-small)" />
</button>
<svelte:fragment slot="list">
<div class="dropped card u-max-width-250" style="--p-card-padding: .75rem">
<slot name="popover" />
</div>
</svelte:fragment>
</Drop>
{/if}
</Label>

<div class="input-text-wrapper">
Expand Down
23 changes: 22 additions & 1 deletion src/lib/elements/forms/inputEmail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { onMount } from 'svelte';
import { FormItem, Helper, Label } from '.';
import NullCheckbox from './nullCheckbox.svelte';
import { Drop } from '$lib/components';

export let label: string;
export let optionalText: string | undefined = undefined;
Expand All @@ -19,6 +20,7 @@

let element: HTMLInputElement;
let error: string;
let show = false;

onMount(() => {
if (element && autofocus) {
Expand Down Expand Up @@ -57,7 +59,26 @@

<FormItem>
<Label {required} {optionalText} {tooltip} hide={!showLabel} for={id}>
{label}
{label}{#if $$slots.popover}
<Drop bind:show display="inline-block">
<!-- TODO: make unclicked icon greyed out and hover and clicked filled -->
&nbsp;<button
type="button"
on:click={() => (show = !show)}
class="tooltip"
aria-label="input tooltip">
<span
class="icon-info"
aria-hidden="true"
style="font-size: var(--icon-size-small)" />
</button>
<svelte:fragment slot="list">
<div class="dropped card u-max-width-250" style="--p-card-padding: .75rem">
<slot name="popover" />
</div>
</svelte:fragment>
</Drop>
{/if}
</Label>

<div
Expand Down
24 changes: 22 additions & 2 deletions src/lib/elements/forms/inputFile.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Trim } from '$lib/components';
import { Drop, Trim } from '$lib/components';
import { humanFileSize } from '$lib/helpers/sizeConvertion';
import { onMount } from 'svelte';
import { Helper, Label } from '.';
Expand All @@ -16,6 +16,7 @@

let input: HTMLInputElement;
let hovering = false;
let show = false;

function setFiles(value: FileList) {
if (!value) return;
Expand Down Expand Up @@ -94,7 +95,26 @@
<div>
{#if label}
<Label {required} {optionalText} {tooltip} hide={!label}>
{label}
{label}{#if $$slots.popover}
<Drop bind:show display="inline-block">
<!-- TODO: make unclicked icon greyed out and hover and clicked filled -->
&nbsp;<button
type="button"
on:click={() => (show = !show)}
class="tooltip"
aria-label="input tooltip">
<span
class="icon-info"
aria-hidden="true"
style="font-size: var(--icon-size-small)" />
</button>
<svelte:fragment slot="list">
<div class="dropped card u-max-width-250" style="--p-card-padding: .75rem">
<slot name="popover" />
</div>
</svelte:fragment>
</Drop>
{/if}
</Label>
{/if}
<div
Expand Down
Loading