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

Upgrade Complex Todos to Meteor 3 #40

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
39 changes: 18 additions & 21 deletions complex-todos-svelte/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,28 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.5.1 # Packages every Meteor app needs to have
mobile-experience@1.1.0 # Packages for a great mobile UX
mongo@1.12.0 # The database Meteor supports right now
meteor-base@1.5.2-rc300.0 # Packages every Meteor app needs to have
mobile-experience@1.1.1-rc300.0 # Packages for a great mobile UX
mongo@2.0.0-rc300.0 # The database Meteor supports right now
jquery # Wrapper package for npm-installed jquery
reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.2.0 # Meteor's client-side reactive programming library

standard-minifier-css@1.7.3 # CSS minifier run for production mode
standard-minifier-js@2.6.1 # JS minifier run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.15.3 # Enable ECMAScript2015+ syntax in app code
typescript@4.3.5 # Enable TypeScript syntax in .ts and .tsx modules
shell-server@0.5.0 # Server-side component of the `meteor shell` command

svelte:compiler
rdb:svelte-meteor-data
static-html
svelte:blaze-integration
reactive-var@1.0.13-rc300.0 # Reactive variable for tracker
tracker@1.3.3-rc300.0 # Meteor's client-side reactive programming library

standard-minifier-css@1.9.3-rc300.0 # CSS minifier run for production mode
standard-minifier-js@3.0.0-rc300.0 # JS minifier run for production mode
es5-shim@4.8.1-rc300.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.16.8-rc300.0 # Enable ECMAScript2015+ syntax in app code
typescript@5.4.3-rc300.0 # Enable TypeScript syntax in .ts and .tsx modules
shell-server@0.6.0-rc300.0 # Server-side component of the `meteor shell` command

static-html@1.3.3-rc300.0
meteortesting:mocha

#
# Accounts and roles
#
accounts-ui@1.4.0
accounts-password@2.0.0
accounts-ui@1.4.3-rc300.0
accounts-password@3.0.0-rc300.0

#
# Data layer
Expand All @@ -40,7 +37,7 @@ dburles:mongo-collection-instances
# Validated methods
#
mdg:validated-method
ddp-rate-limiter@1.1.0
ddp-rate-limiter@1.2.1-rc300.0

#
# Logging
Expand All @@ -51,9 +48,9 @@ ostrio:loggerconsole
#
# Scheduled jobs
#
msavin:sjobs

#
# APM
#
montiapm:agent
zodern:melte
2 changes: 1 addition & 1 deletion complex-todos-svelte/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@2.3.5
METEOR@3.0-rc.0
198 changes: 99 additions & 99 deletions complex-todos-svelte/.meteor/versions
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
accounts-base@2.0.1
accounts-password@2.0.0
accounts-ui@1.4.0
accounts-ui-unstyled@1.5.0
aldeed:collection2@3.4.1
allow-deny@1.1.0
autoupdate@1.7.0
babel-compiler@7.7.0
babel-runtime@1.5.0
base64@1.0.12
binary-heap@1.0.11
blaze@2.5.0
blaze-tools@1.1.2
boilerplate-generator@1.7.1
caching-compiler@1.2.2
caching-html-compiler@1.2.1
callback-hook@1.3.1
check@1.3.1
dburles:mongo-collection-instances@0.3.1
ddp@1.4.0
ddp-client@2.5.0
ddp-common@1.4.0
ddp-rate-limiter@1.1.0
ddp-server@2.4.1
diff-sequence@1.1.1
dynamic-import@0.7.1
ecmascript@0.15.3
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.11.1
ecmascript-runtime-server@0.10.1
ejson@1.1.1
email@2.1.1
es5-shim@4.8.0
fetch@0.1.1
geojson-utils@1.0.10
hot-code-push@1.0.4
html-tools@1.1.2
htmljs@1.1.1
accounts-base@3.0.0-rc300.0
accounts-password@3.0.0-rc300.0
accounts-ui@1.4.3-rc300.0
accounts-ui-unstyled@1.7.1-rc300.0
aldeed:collection2@4.0.1
aldeed:simple-schema@1.13.1
allow-deny@2.0.0-rc300.0
autoupdate@2.0.0-rc300.0
babel-compiler@7.11.0-rc300.0
babel-runtime@1.5.2-rc300.0
base64@1.0.13-rc300.0
binary-heap@1.0.12-rc300.0
blaze@3.0.0-alpha300.17
blaze-tools@2.0.0-alpha300.17
boilerplate-generator@2.0.0-rc300.0
caching-compiler@2.0.0-rc300.0
caching-html-compiler@2.0.0-alpha300.17
callback-hook@1.6.0-rc300.0
check@1.3.3-rc300.0
core-runtime@1.0.0-rc300.0
dburles:mongo-collection-instances@1.0.0-beta300.2
ddp@1.4.2-rc300.0
ddp-client@3.0.0-rc300.0
ddp-common@1.4.1-rc300.0
ddp-rate-limiter@1.2.1-rc300.0
ddp-server@3.0.0-rc300.0
diff-sequence@1.1.3-rc300.0
dynamic-import@0.7.4-rc300.0
ecmascript@0.16.8-rc300.0
ecmascript-runtime@0.8.2-rc300.0
ecmascript-runtime-client@0.12.2-rc300.0
ecmascript-runtime-server@0.11.1-rc300.0
ejson@1.1.4-rc300.0
email@3.0.0-rc300.0
es5-shim@4.8.1-rc300.0
facts-base@1.0.2-rc300.0
fetch@0.1.4-rc300.0
geojson-utils@1.0.12-rc300.0
hot-code-push@1.0.5-rc300.0
html-tools@2.0.0-alpha300.17
htmljs@2.0.0-alpha300.17
http@1.4.4
id-map@1.1.1
inter-process-messaging@0.1.1
id-map@1.2.0-rc300.0
inter-process-messaging@0.1.2-rc300.0
jquery@3.0.0
launch-screen@1.3.0
less@3.0.2
livedata@1.0.18
localstorage@1.2.0
logging@1.2.0
lai:collection-extensions@1.0.0-beta300.2
launch-screen@1.3.1-rc300.0
less@4.1.1-beta300.6
localstorage@1.2.1-rc300.0
logging@1.3.3-rc300.0
mdg:validated-method@1.2.0
meteor@1.9.3
meteor-base@1.5.1
meteor@2.0.0-rc300.0
meteor-base@1.5.2-rc300.0
meteortesting:browser-tests@1.3.4
meteortesting:mocha@2.0.2
meteortesting:mocha-core@8.1.2
minifier-css@1.5.4
minifier-js@2.6.1
minimongo@1.7.0
mobile-experience@1.1.0
mobile-status-bar@1.1.0
modern-browsers@0.1.5
modules@0.16.0
modules-runtime@0.12.0
mongo@1.12.0
mongo-decimal@0.1.2
mongo-dev-server@1.1.0
mongo-id@1.0.8
mongo-livedata@1.0.12
montiapm:agent@2.44.1
montiapm:meteorx@2.2.0
msavin:sjobs@4.1.0
npm-mongo@3.9.1
observe-sequence@1.0.19
ordered-dict@1.1.0
minifier-css@2.0.0-rc300.0
minifier-js@3.0.0-rc300.0
minimongo@2.0.0-rc300.0
mobile-experience@1.1.1-rc300.0
mobile-status-bar@1.1.1-rc300.0
modern-browsers@0.1.10-rc300.0
modules@0.19.1-rc300.0
modules-runtime@0.13.2-rc300.0
mongo@2.0.0-rc300.0
mongo-decimal@0.1.4-beta300.7
mongo-dev-server@1.1.1-rc300.0
mongo-id@1.0.9-rc300.0
montiapm:agent@3.0.0-beta.4
montiapm:meteorx@2.3.1
npm-mongo@4.16.1-rc300.0
observe-sequence@2.0.0-alpha300.17
ordered-dict@1.2.0-rc300.0
ostrio:logger@2.0.9
ostrio:loggerconsole@2.0.5
promise@0.12.0
promise@1.0.0-rc300.0
raix:eventemitter@1.0.0
random@1.2.0
rate-limit@1.0.9
rdb:svelte-meteor-data@0.3.0
react-fast-refresh@0.1.1
reactive-dict@1.3.0
reactive-var@1.0.11
reload@1.3.1
retry@1.1.0
routepolicy@1.1.1
service-configuration@1.1.0
session@1.2.0
sha@1.0.9
shell-server@0.5.0
socket-stream-client@0.4.0
spacebars@1.2.0
spacebars-compiler@1.3.0
standard-minifier-css@1.7.3
standard-minifier-js@2.6.1
static-html@1.3.2
svelte:blaze-integration@0.4.0
svelte:compiler@3.31.2
templating@1.4.1
templating-compiler@1.4.1
templating-runtime@1.5.0
templating-tools@1.2.1
tmeasday:check-npm-versions@1.0.2
tracker@1.2.0
typescript@4.3.5
underscore@1.0.10
url@1.3.2
webapp@1.11.1
webapp-hashing@1.1.0
random@1.2.2-rc300.0
rate-limit@1.1.2-rc300.0
react-fast-refresh@0.2.8-rc300.0
reactive-dict@1.3.2-rc300.0
reactive-var@1.0.13-rc300.0
reload@1.3.2-rc300.0
retry@1.1.1-rc300.0
routepolicy@1.1.2-rc300.0
service-configuration@1.3.2-rc300.0
session@1.2.2-rc300.0
sha@1.0.10-rc300.0
shell-server@0.6.0-rc300.0
socket-stream-client@0.5.2-rc300.0
spacebars@2.0.0-alpha300.17
spacebars-compiler@2.0.0-alpha300.17
standard-minifier-css@1.9.3-rc300.0
standard-minifier-js@3.0.0-rc300.0
static-html@1.3.3-rc300.0
templating@1.4.4-alpha300.17
templating-compiler@2.0.0-alpha300.17
templating-runtime@2.0.0-alpha300.17
templating-tools@2.0.0-alpha300.17
tracker@1.3.3-rc300.0
typescript@5.4.3-rc300.0
underscore@1.0.14-rc300.0
url@1.3.3-rc300.0
webapp@2.0.0-rc300.0
webapp-hashing@1.1.2-rc300.0
zodern:melte@1.7.2
zodern:melte-compiler@1.4.1
zodern:meteor-package-versions@0.2.1
zodern:types@1.0.13
8 changes: 2 additions & 6 deletions complex-todos-svelte/client/ui/App.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<script>
import {Link, Route, Router} from 'svelte-routing';
import {BlazeTemplate} from 'meteor/svelte:blaze-integration';
import { Link, Route, Router } from 'svelte-routing';
import Tasks from './Tasks.svelte';
import About from './About.svelte';

export let url = '';

// Tasks svelte is the homepage of the application. Thus set "/tasks" on "/" load
Expand All @@ -29,9 +28,6 @@
<li class="nav-item">
<Link to="about" class="nav-link">About</Link>
</li>
<li class="nav-item nav-login">
<BlazeTemplate template="loginButtons"/>
</li>
</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions complex-todos-svelte/client/ui/Task.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import {useTracker} from 'meteor/rdb:svelte-meteor-data';
import {tasksRemove, tasksUpdateAsChecked, tasksUpdateAsPrivate} from '../../imports/modules/tasks/tasks.methods.js';

export let key;
export let task;
let currentUser;
let showButton = false;

$: currentUser = useTracker(() => Meteor.user());
$m: currentUser = Meteor.user();

$: {
if($currentUser) {
Expand Down
31 changes: 12 additions & 19 deletions complex-todos-svelte/client/ui/Tasks.svelte
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
<script>
import {Meteor} from 'meteor/meteor';
import {useTracker} from 'meteor/rdb:svelte-meteor-data';
import { Meteor } from 'meteor/meteor';
import Task from './Task.svelte';
import {taskRepository} from '../../imports/modules/tasks/taskRepository.js';
import { taskRepository } from '../../imports/modules/tasks/taskRepository.js';
import TaskAddNewForm from './TaskAddNewForm.svelte';
import {TASKS_PUBLICATION} from '../../imports/modules/tasks/enums/publications.js';
import { TASKS_PUBLICATION } from '../../imports/modules/tasks/enums/publications.js';

let hideCompleted = false;
let tasks;
let currentUser;
export let incompleteCount;

$: Meteor.subscribe(TASKS_PUBLICATION.TASKS);

$: incompleteCount = useTracker(() => taskRepository.find({checked: {$ne: true}}).count());

$: currentUser = useTracker(() => Meteor.user());
$m: Meteor.subscribe(TASKS_PUBLICATION.TASKS);

const taskStore = taskRepository.find({}, {sort: {createdAt: -1}});
$m: incompleteCount = taskRepository.find({checked: {$ne: true}}).count();

$: {
tasks = $taskStore;
$m: currentUser = Meteor.user();

if(hideCompleted)
{
tasks = tasks.filter(task => !task.checked);
}
}
$m: tasks = taskRepository.find({
...(hideCompleted ? {checked: {$ne: true}} : {})
}, {sort: {createdAt: -1}}).fetch();
</script>

<div class="container">
Expand All @@ -37,7 +30,7 @@
</div>
</div>

<h2>Pending Items ({ $incompleteCount })</h2>
<h2>Pending Items ({ incompleteCount })</h2>

<div class="row">
<div class="col-sm">
Expand Down
Loading