benkingcode / ember-routable-modal Goto Github PK
View Code? Open in Web Editor NEWAn ember-cli addon for implementing URL-first modals.
License: MIT License
An ember-cli addon for implementing URL-first modals.
License: MIT License
Hey! I love this addon and it has been easy to work with, but I've got a question.
I'm currently using a modal that handles a user creation form for an app and was curious if there was a way to override the behavior when a user clicks out of a modal to close it. I've currently set a cancel button and the typical 'X' in the corner to close the modal to rollback my model on close, but when looking through the documentation I haven't found a way to mimic that behavior when a user clicks away.
I don't mind working on adding a feature like this if it doesn't currently exist if you'd like, but I wanted to double check before I go down that path =).
Thanks!
The checks in the current-routed-modal
service fail in FastBoot mode. This seems to be because the checks are merely looking whether $
or window
are undefined, but it seems to be possible for both to be defined in FastBoot mode, because that's what's happening to me.
I'm not sure what the most reliable check is. Ensuring document
is undefined seems to work. Injecting the fastboot
service and checking its isFastBoot
property seems to work, too.
integration test, I mean Ember integration test.
TypeError: Cannot read property 'get' of undefined
When launching the basic, generated integration test of Ember
This might sound like a weird suggestion, but it would be nice to have an option to make a modal non-routable (basically being able to disable the primary feature of this addon.
Here is why:
So yes, I currently have to use both ember-routable-modal
and ember-modal-dialog
, but would like to use only one of them (yours!).
What do you think?
I've tried adding an outlet within my modal so that I can create steps for creating an order, eg. order/create/details, order/create/items
The outlet doesn't seem to render when navigating via link-to, however, it does render when I navigate to the nested route by entering the url directly.
Ember Version: 2.15.0
Just an idea. Not sure if this should be part of the ember addon itself or in the code that uses the addon?
When moving from blog.com/articles/5/
to blog.com/articles/5/edit
, the modal opens and the model for article with id 5 is found without problem.
When visiting blog.com/articles/5/edit
directly, the model is not found unless I look for it myself:
import Ember from 'ember';
import ModalRouteMixin from 'ember-routable-modal/mixins/route';
const { Route } = Ember;
export default Route.extend(ModalRouteMixin, {
model() {
return this.store.peekRecord('article', this.router.targetState.routerJsState.params['articles.show'].id);
}
});
Is this something that could be avoided? Thanks
Here's a branch with failing tests illustrating the issue:
https://github.com/metricly/ember-routable-modal/tree/current-route-name-test-failures
It seems that the transition isn't completed when the modal isn't the route used for the initial transition.
The modal doesn't discard as it should. If we click below or above the modal, it works, but not when we click on the grey space on left or right
Hi,
we´ve got an weired behaviour opening a routed modal with a model hook.
There are 2 routed modals. One without a model hook (MR1) and one with a model hook (MR2). For both there is no loading state defined.
Opening just MR2 works as expected.
Defining an loading template for MR2 fixes the problem of case 3.
This would be a great feature
I can see there is a v0.4.0 but it's not available in https://www.npmjs.com/package/ember-routable-modal?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.