cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@chromium.org>
Subject Re: How to implement the navigator.notification in Firefox OS?
Date Tue, 04 Mar 2014 20:07:19 GMT
Jesse,

I do agree, that would be nice, but I think its going to be difficult to do
this right.  I would not want each plugin to bundle its own underscore, for
example.  At the very least, we should set a standard for using
one-plugin-per-library, but better yet would be to use an existing package
manager somehow.

Not sure how to solve the issue, I'm really curious about others' ideas.

-Michal


On Tue, Mar 4, 2014 at 2:53 PM, purplecabbage <purplecabbage@gmail.com>wrote:

> These are features I am looking to add to plugman. Currently there isn't a
> way to add CSS or generic JS, short of runtime heroics.
>
> It would be nice to be able to make a Cordova plugin that, for example,
> used topcoat, underscore or angular.
> Currently all plugin js gets wrapped in our define/require closure which
> may conflict with existing libs.
>
> I will create issues once I am on a desktop.
>
> Sent from my iPhone
>
> > On Mar 4, 2014, at 9:25 AM, Brian LeRoux <b@brian.io> wrote:
> >
> > oooh dirty
> >
> > I like it
> >
> >
> >> On Tue, Mar 4, 2014 at 9:17 AM, Michal Mocny <mmocny@chromium.org>
> wrote:
> >>
> >> Ah wait, that won't inject it into the page.. Sorry, misunderstood the
> >> problem.
> >>
> >> Why not just write JS that runs on startup (after domcontentready but
> >> delaying onpluginready) that injects the CSS?
> >>
> >>
> >>> On Tue, Mar 4, 2014 at 12:07 PM, Michal Mocny <mmocny@chromium.org>
> wrote:
> >>>
> >>> <asset> ?
> >>
> http://cordova.apache.org/docs/en/edge/plugin_ref_spec.md.html#Plugin%20Specification_asset_element
> >>>
> >>>
> >>>> On Tue, Mar 4, 2014 at 11:45 AM, Brian LeRoux <b@brian.io> wrote:
> >>>>
> >>>> Seems to me that you want the plugin installation to copy the css
> file.
> >>>> its
> >>>> hacky, but you could use <js-file> [1] as a workaround and file
a bug
> to
> >>>> add other file types for copying.
> >>>>
> >>>> http://cordova.apache.org/docs/en/3.0.0/plugin_ref_spec.md
> >>>>
> >>>>
> >>>> On Mon, Mar 3, 2014 at 11:51 PM, Robber Phex <robberphex@gmail.com>
> >>>> wrote:
> >>>>
> >>>>> I suggest some method to solve it.
> >>>>>
> >>>>> First, we can make a rule that cordova-plugin-dialogs must work
with
> >>>>> notification.css. and, plugin will create a null css in android
for
> >>>> avoid
> >>>>> warming. we also update document.
> >>>>>
> >>>>> Second, in HTML, cordova-plugin-dialogs can work without link to
> >>>>> notification.css. and, the android platform is no problem, but in
> >>>> Firefox
> >>>>> OS, the js will add link to notification.css dynamically.
> >>>>>
> >>>>> All in all, I think the plugin must provide a single method to use
> it.
> >>>> same
> >>>>> code worked in Firefox OS, but warming in Android is not good enough.
> >>>>>
> >>>>>
> >>>>>> On Tue, Mar 4, 2014 at 2:30 PM, Robber Phex <robberphex@gmail.com>
> >>>>> wrote:
> >>>>>
> >>>>>> I think, If the developer must add notification.css, we should
> >> update
> >>>> the
> >>>>>> document as soon as possible.
> >>>>>>
> >>>>>> such as
> >>
> http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification
> >>>>>>
> >>>>>> In last, I don't think it is good idea that let app show some
> >> warming
> >>>> in
> >>>>>> android. I suggest the plugin solve it.
> >>>>>>
> >>>>>>
> >>>>>> On Tue, Mar 4, 2014 at 9:30 AM, Carlos Santana <
> >> csantana23@gmail.com
> >>>>>> wrote:
> >>>>>>
> >>>>>>> The firefox documentation for the plugin [1] states that
the user
> >>>> needs
> >>>>> to
> >>>>>>> add the css entry in index.html
> >>>>>>>
> >>>>>>> <link rel="stylesheet" type="text/css" href="css/notification.css"
> >> />
> >>>>>>>
> >>>>>>> I don't completely understand the problem with android.
> >>>>>>> Are you referring to the fact that you wan to use same index.html
> >> for
> >>>>> both
> >>>>>>> android and firefox and that the notification.css will be
missing
> >> for
> >>>>>>> android platform?
> >>>>>>> If that is the case use the merges to customize each platform.
> >>>>>>>
> >>>>>>> in your case you can put an empty file in
> >>>> merges/css/notifications.css
> >>>>>>>
> >>>>>>> The cordova docs [2] explains a similar use case.
> >>>>>>>
> >>>>>>> If you are looking to enhance the plugin to inject the css
> >>>> dynamically
> >>>>> you
> >>>>>>> will need to do that from the plugin's javascript for firefox
> >> located
> >>>>> here
> >>>>>>> [3]
> >>>>>>>
> >>>>>>>
> >>>>>>> [1]:
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/master/doc/index.md#firefox-os-quirks
> >>>>>>> [2]:
> >>
> http://cordova.apache.org/docs/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
> >>>>>>> [3]:
> >>
> https://github.com/apache/cordova-plugin-dialogs/blob/dev/src/firefoxos/notification.js
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Mon, Mar 3, 2014 at 2:49 AM, Robber Phex <robberphex@gmail.com>
> >>>>> wrote:
> >>>>>>>
> >>>>>>>> There is anyone?
> >>>>>>>>
> >>>>>>>> I found that the plug "cordova-plugin-dialogs" is already
> >> implement
> >>>>> the
> >>>>>>>> navigator.notification, but it need refer the CSS file
> >>>>>>>> "css/notification.css" in Firefox OS.
> >>>>>>>>
> >>>>>>>> This is a dilemma:
> >>>>>>>>
> >>>>>>>> If we consider Firefox OS, we must add link tag with
> >>>>>>> css/notification.css,
> >>>>>>>> but in android, the log display "AndroidProtocolHandler(2620):
> >>>> Unable
> >>>>> to
> >>>>>>>> open asset URL: file:///android_asset/www/css/notification.css"
> >>>>>>>>
> >>>>>>>> Or, if we not refer "css/notification.css", The
> >>>> navigator.notification
> >>>>>>> will
> >>>>>>>> not work at Firefox OS. such as CB-6154:
> >>>>>>>> https://issues.apache.org/jira/browse/CB-6145
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Do someone have a solution?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Mon, Mar 3, 2014 at 7:31 AM, Robber Phex <
> >> robberphex@gmail.com>
> >>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> Hi,all.
> >>>>>>>>>
> >>>>>>>>> I found CB-6154, and I want to know how to fix it
gracefully,
> >>>> how to
> >>>>>>>>> implement navigator.notification gracefully in FIrefox
OS?
> >>>>>>>>>
> >>>>>>>>> CB-6154:https://issues.apache.org/jira/browse/CB-6145
> >>>>>>>>>
> >>>>>>>>> Any suggestion is welcome!
> >>>>>>>>> Thanks.
> >>>>>>>>>
> >>>>>>>>> --
> >>>>>>>>> Regards,
> >>>>>>>>> RobberPhex
> >>>>>>>>>
> >>>>>>>>> About me: http://about.me/RobberPhex
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Regards,
> >>>>>>>> RobberPhex
> >>>>>>>>
> >>>>>>>> About me: http://about.me/RobberPhex
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Carlos Santana
> >>>>>>> <csantana23@gmail.com>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Regards,
> >>>>>> RobberPhex
> >>>>>>
> >>>>>> About me: http://about.me/RobberPhex
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Regards,
> >>>>> RobberPhex
> >>>>>
> >>>>> About me: http://about.me/RobberPhex
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message