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.

[email protected].1 # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
mongo@1.12.0 # The database Meteor supports right now
[email protected].2-rc300.0 # Packages every Meteor app needs to have
[email protected].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
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library

[email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Enable TypeScript syntax in .ts and .tsx modules
[email protected] # Server-side component of the `meteor shell` command

svelte:compiler
rdb:svelte-meteor-data
static-html
svelte:blaze-integration
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library

[email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Enable TypeScript syntax in .ts and .tsx modules
[email protected] # Server-side component of the `meteor shell` command

[email protected]
meteortesting:mocha

#
# Accounts and roles
#
[email protected]
accounts-password@2.0.0
[email protected].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 @@
[email protected]
[email protected]
[email protected]
[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
dburles:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
aldeed:[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
dburles:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
id-map@1.1.1
[email protected].1
id-map@1.2.0-rc300.0
[email protected].2-rc300.0
[email protected]
launch-screen@1.3.0
[email protected]
[email protected]
[email protected]
logging@1.2.0
lai:collection-extensions@1.0.0-beta300.2
[email protected]
[email protected]
[email protected].1-rc300.0
logging@1.3.3-rc300.0
mdg:[email protected]
meteor@1.9.3
[email protected].1
meteor@2.0.0-rc300.0
[email protected].2-rc300.0
meteortesting:[email protected]
meteortesting:[email protected]
meteortesting:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
montiapm:[email protected]
montiapm:[email protected]
msavin:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
montiapm:[email protected]
montiapm:[email protected]
[email protected]
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected]
promise@0.12.0
promise@1.0.0-rc300.0
raix:[email protected]
[email protected]
[email protected]
rdb:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
svelte:[email protected]
svelte:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
tmeasday:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
zodern:[email protected]
zodern:[email protected]
zodern:[email protected]
zodern:[email protected]
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