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

Svelte re-build #161

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
f792762
work on list pages
narthur Nov 17, 2024
0fcaf69
show task status on tasks
narthur Nov 17, 2024
40f06f4
task formatting
narthur Nov 17, 2024
8a9275d
allow users to toggle completion state
narthur Nov 17, 2024
ba95421
reduce spacing
narthur Nov 17, 2024
e954dd8
sort tasks
narthur Nov 17, 2024
b681d39
install svelte query
narthur Nov 17, 2024
fb08260
Revert "install svelte query"
narthur Nov 17, 2024
10d9c84
work on new task form
narthur Nov 17, 2024
095624c
Update TaskAdd.svelte
narthur Nov 17, 2024
ff8e0ce
Update TaskAdd.svelte
narthur Nov 17, 2024
b3ead51
Update TaskAdd.svelte
narthur Nov 17, 2024
9b60f37
show errors
narthur Nov 17, 2024
c9b29cf
handle add task success
narthur Nov 17, 2024
384bf4a
button styling
narthur Nov 17, 2024
153a390
add nav
narthur Nov 17, 2024
e6cf688
archive sort
narthur Nov 17, 2024
61a9907
logout button
narthur Nov 17, 2024
c21e54c
fix login page layout
narthur Nov 17, 2024
6132e80
Update Nav.svelte
narthur Nov 17, 2024
f66d56c
fix nav on register page
narthur Nov 17, 2024
0e9ad71
work on freshworks widget
narthur Nov 17, 2024
8dff7b7
help > feedback
narthur Nov 17, 2024
e9f73ff
help link
narthur Nov 17, 2024
e8038cc
show the user's email
narthur Nov 17, 2024
abf4ff6
work on nav
narthur Nov 17, 2024
dea19b4
work on nav
narthur Nov 17, 2024
bad79b6
active nav item
narthur Nov 17, 2024
ac9056d
add account settings
narthur Nov 17, 2024
b001130
nav wrapping
narthur Nov 17, 2024
6df6c6e
add account loading state
narthur Nov 17, 2024
0834a8e
add getMe error handling
narthur Nov 17, 2024
22b0063
Update PasswordSettings.svelte
narthur Nov 17, 2024
5339d57
Update PaymentSettings.svelte
narthur Nov 17, 2024
d01c404
Update ApiSettings.svelte
narthur Nov 17, 2024
7301e3a
add darkmode button
narthur Nov 17, 2024
faed3a2
fix theme override
narthur Nov 17, 2024
4254489
fix logout error
narthur Nov 17, 2024
9979b8b
work on dark mode toggle
narthur Nov 17, 2024
91370b3
work on copy functionality
narthur Nov 17, 2024
e8554f9
add edit button
narthur Nov 17, 2024
f02d105
add edit button
narthur Nov 17, 2024
cac7be9
add edit validation
narthur Nov 17, 2024
4fbde6f
Update TaskAdd.svelte
narthur Nov 17, 2024
baa13a6
work on edit modal
narthur Nov 17, 2024
85f7413
work on uncle button
narthur Nov 17, 2024
d41e670
uncle confirmation
narthur Nov 17, 2024
2e6c7fd
use icons for task actions
narthur Nov 17, 2024
7030641
wrap long tasks
narthur Nov 17, 2024
fce758d
add task filtering
narthur Nov 17, 2024
fbfbd8d
Create knowledge.md
narthur Nov 17, 2024
c377e55
add General Settings section
narthur Nov 17, 2024
5a84e96
tabbed interface on account page
narthur Nov 17, 2024
445cff2
add integration settings
narthur Nov 17, 2024
3c39565
hide unusable actions on archive page
narthur Nov 17, 2024
87da82e
add feedback form
narthur Nov 17, 2024
f9a61ad
Revert "add feedback form"
narthur Nov 17, 2024
bf6f6d1
add task refresh button
narthur Nov 17, 2024
580341a
loading bar
narthur Nov 17, 2024
7cb298a
move loading bar to base layout
narthur Nov 17, 2024
ca1b1e7
Create qa-checklist.md
narthur Nov 18, 2024
6a0465c
use sdk activity subscription for loading bar
narthur Nov 18, 2024
504091f
improve loading animation
narthur Nov 18, 2024
805a2e4
accessibility, styling, code formatting
narthur Nov 18, 2024
98e39c9
button color
narthur Nov 18, 2024
20572d3
remove old loading code
narthur Nov 18, 2024
79e04f4
refresh tap target
narthur Nov 18, 2024
be6dca6
adjust some spacing a bit
narthur Nov 20, 2024
a9354b6
share modal logic between modals
narthur Nov 20, 2024
bc535a7
work on task list
narthur Nov 20, 2024
b18ff2b
undo bad edit
narthur Nov 20, 2024
1ef2cff
add check command
narthur Nov 20, 2024
6fe39c5
type fix
narthur Nov 20, 2024
3e79ede
fix type issues
narthur Nov 20, 2024
de4692e
type fixes
narthur Nov 20, 2024
5637e9a
fix type error
narthur Nov 20, 2024
0deaf5c
verify command
narthur Nov 20, 2024
5334620
work on un-complete past-due confirmation
narthur Nov 20, 2024
cd6da93
confirm on mark incomplete not complete
narthur Nov 20, 2024
469cfbe
work on confirmation step for marking past-due task incomplete
narthur Nov 20, 2024
1f098fa
extract TaskCheckbox component
narthur Nov 20, 2024
07b9170
exclude src/react from tsconfig
narthur Nov 20, 2024
688177a
Delete pr.yml
narthur Nov 20, 2024
f8496ca
add TaskCheckbox tests
narthur Nov 20, 2024
f928d43
exclude old react tests
narthur Nov 20, 2024
b97aa97
fix tests
narthur Nov 20, 2024
6778193
Update vitest.config.ts
narthur Nov 20, 2024
a963292
Create TaskCheckbox.ts
narthur Nov 20, 2024
7d20443
use toggleComplete from TaskCheckbox.ts
narthur Nov 20, 2024
097ca52
Update TaskCheckbox.spec.ts
narthur Nov 20, 2024
e52b780
add eslint-plugin-svelte
narthur Nov 20, 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
24 changes: 0 additions & 24 deletions .github/workflows/pr.yml

This file was deleted.

16 changes: 14 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
import { defineConfig } from 'astro/config';
import Icons from 'unplugin-icons/vite';

import react from '@astrojs/react';
import { visualizer } from 'rollup-plugin-visualizer';
import svelte from '@astrojs/svelte';

// https://astro.build/config
export default defineConfig({
integrations: [react()],
integrations: [
react(),
svelte({
extensions: ['.svelte'],
}),
],
vite: {
plugins: [visualizer({ template: 'raw-data' })],
plugins: [
visualizer({ template: 'raw-data' }),
Icons({
compiler: 'svelte',
}),
],
build: {
rollupOptions: {
output: {
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import testingLibrary from 'eslint-plugin-testing-library';
import eslintPluginSvelte from 'eslint-plugin-svelte';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -29,6 +30,7 @@ export default [
'src/env.d.ts',
],
},
...eslintPluginSvelte.configs['flat/recommended'],
...fixupConfigRules(
compat.extends(
'eslint:recommended',
Expand Down
74 changes: 74 additions & 0 deletions knowledge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# TaskRatchet Web App

## Verifying changes

Use `pnpm verify` to check that code changes are valid.

## Task Status Behavior

- Pending tasks should have enabled controls (edit button, checkbox)
- Task status must persist across page refreshes
- Some controls should be disabled for non-pending tasks
- Task status determines available actions:
- Pending: Can edit, complete, uncle, copy
- Complete: Can mark incomplete, copy
- Expired: Can copy
- Completing tasks requires careful handling:
- Marking past-due tasks incomplete is a critical action
- Reversing incompleted past-due tasks requires support intervention
- UI should prevent accidental completion

## Future Improvements

### UI/UX

- Add loading states for actions (uncle, edit, etc.)
- Improve mobile responsiveness
- Test dark mode thoroughly
- Add keyboard navigation
- Add ARIA labels for better accessibility

### Error Handling

- Add error handling for failed API calls
- Add error boundaries for component failures

### Testing

- Add unit tests for new Svelte components
- Test performance with large task lists
- Test across different browsers
- Add end-to-end tests for critical paths

### Features

- Consider adding task sorting options
- Consider adding task filtering by status
- Consider adding task categories or tags

## Style Guide

- Keep components minimal and focused
- Use CSS variables for theming
- Follow BEM naming convention for CSS
- Use TypeScript for type safety

## Architecture

- Components should be self-contained
- State management should be simple and local when possible
- Modal state should be managed by the modal component
- API calls should be centralized

### Migration Strategy

- Migrating from React to Svelte
- New features should be built in Svelte
- Keep React and Svelte code separate:
- React code lives in src/react/
- React tests excluded from main test suite
- New tests should be written for Svelte components
- Test configuration:
- Exclude React tests while preserving Vitest defaults
- React tests remain in src/react/ but aren't run by default
- Maintain separate test suites for React and Svelte
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@
"preview": "astro preview",
"astro": "astro",
"preinstall": "npx only-allow pnpm",
"checkTs": "tsc --noEmit",
"format": "prettier --write .",
"lint": "eslint --max-warnings 0 .",
"lint:fix": "eslint --max-warnings 0 --fix .",
"test": "vitest",
"unused": "pnpm dlx depcheck"
"unused": "pnpm dlx depcheck",
"check": "svelte-check",
"checkTs": "npm run check",
"verify": "npm run build && npm run check && npm run lint && npm run test -- --run"
},
"dependencies": {
"@astrojs/check": "^0.9.3",
"@astrojs/react": "^3.6.2",
"@astrojs/svelte": "^6.0.1",
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.16.6",
"@mui/lab": "5.0.0-alpha.173",
"@mui/material": "^5.16.6",
"@mui/x-date-pickers": "^7.12.0",
"@taskratchet/sdk": "^0.0.7",
"@taskratchet/sdk": "^0.1.1",
"astro": "^4.15.1",
"dayjs": "^1.11.12",
"eslint-plugin-svelte": "^2.46.0",
"humanize-duration": "^3.32.1",
"query-string": "^9.1.0",
"react": "^18.3.1",
Expand All @@ -37,12 +41,14 @@
"react-query": "3.39.3",
"react-router-dom": "^6.26.0",
"react-toastify": "^10.0.5",
"typescript": "^5.5.4"
"svelte": "^5.2.2",
"typescript": "^5.6.3"
},
"devDependencies": {
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.8.0",
"@iconify/json": "^2.2.273",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
Expand All @@ -67,8 +73,10 @@
"jsdom": "^24.1.1",
"prettier": "3.3.3",
"rollup-plugin-visualizer": "^5.12.0",
"svelte-check": "^4.0.9",
"type-fest": "^4.23.0",
"typescript": "^5.5.4",
"unplugin-icons": "^0.20.1",
"vitest": "^2.0.5",
"vitest-fetch-mock": "^0.3.0"
}
Expand Down
Loading
Loading