Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Blaze update to 1.10.2 and update flow router to ostrio:flow-router-extra #280

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vparpoil
Copy link

@vparpoil vparpoil commented May 5, 2020

See discussion here : meteor/meteor#11014

Copy link

@dr-dimitru dr-dimitru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vparpoil hope it's not too late :) Just noticed this PR (and another one where I left comments)

Please see my review.

Also in temple line 86 got to be updated to:

{{> yield}}

@@ -13,20 +12,21 @@ import '../../ui/accounts/accounts-templates.js';
FlowRouter.route('/lists/:_id', {
name: 'Lists.show',
action() {
BlazeLayout.render('App_body', { main: 'Lists_show_page' });
this.render('App_body', { main: 'Lists_show_page' });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.render('App_body', 'Lists_show_page');

},
});

FlowRouter.route('/', {
name: 'App.home',
action() {
BlazeLayout.render('App_body', { main: 'app_rootRedirector' });
this.render('App_body', { main: 'app_rootRedirector' });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.render('App_body', 'app_rootRedirector');

action() {
BlazeLayout.render('App_body', { main: 'App_notFound' });
this.render('App_body', { main: 'App_notFound' });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.render('App_body', 'App_notFound');

@@ -69,7 +68,7 @@ Template.App_body.helpers({
] });
},
activeListClass(list) {
const active = ActiveRoute.name('Lists.show')
const active = FlowRouter.current().route.name === 'Lists.show'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { FlowRouter , RouterHelpers } from 'meteor/ostrio:flow-router-extra';

RouterHelpers.name('Lists.show');

See docs for more details

@@ -121,7 +120,7 @@ Template.App_body.events({
Meteor.logout();

// if we are on a private list, we'll need to go to a public one
if (ActiveRoute.name('Lists.show')) {
if (FlowRouter.current().route.name === 'Lists.show') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { FlowRouter , RouterHelpers } from 'meteor/ostrio:flow-router-extra';

RouterHelpers.name('Lists.show');

See docs for more details

@vparpoil
Copy link
Author

@dr-dimitru thank you for your comments!
I was trying to implement your modifications, but it leads to a broken behavior :

  • on first load, the todos don't appear on the right side. It works if I remove the {{#momentum plugin="fade"}} line 84 of imports/ui/layouts/app-body.html. I can't find what may cause the issue. Changing the selected list still works.

  • the sign-in / join screen don't display anymore. I guess the mealsunite:flow-routing-extra needs specific configuration to work with {{> yield}} ?

Any hint on how to fix those ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants