Coder Social home page Coder Social logo

uncatcrea / wp-appkit Goto Github PK

View Code? Open in Web Editor NEW
194.0 194.0 65.0 7.3 MB

WP-AppKit WordPress plugin (create mobile apps connected to WordPress)

Home Page: http://uncategorized-creations.com/

JavaScript 49.82% CSS 5.04% HTML 1.72% PHP 43.42%

wp-appkit's People

Contributors

blupu avatar hammyhavoc avatar lpointet avatar mleroi avatar petitphp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-appkit's Issues

Stats diff with empty versions

When the app version is empty (and has always been), Stats.getVersionDiff() returns an object with NaN as "diff" value.
I guess if someone is using plain text versions (e.g. 'october'), the same problem will appear.

The direct consequence is that "app-version-changed" event is always fired, even if the version didn't really change.

version_compare should probably behave differently if one of the version values is not a number, what do you think?

"Universal" platform option

Offering a "Universal" platform option when creating/editing an application would be a good goal to aim for after the beta so that Phonegap Build can compile apps for each platform from one zip file, yet still offering the ability to keep apps per platform separate is also a good option as not everybody will want the same UI/UX per platform.

wpak_unavailable_media.png appears unexpectedly in a single post

In the only post on https://www.hammyhavoc.com, https://www.hammyhavoc.com/wp-content/uploads/wpak_unavailable_media.png appears as an image randomly in the post where a hyperlink should be rather than any kind of image, this doesn't seem to be down to any particular WP-AppKit theme, I've tried it using the following:

  • Nihao-android
  • Nihao-ios
  • Bootstrap
  • Wp-marmite-ios

The paragraph snippet is as follows:

Myself, <a title="Dan Booth Presents The Boo Tube" href="http://www.thebootube.com">Dan</a>, <a title="The Alice Jones Official Website" href="http://www.thealicejones.com">Alice</a> and <a title="Bryan Desrosiers Official Website" href="http://www.bryandesrosiers.com">Bryan</a> are hard at work to bring Previous Magazine in new ways to our cult following, we're especially eager to get into video content as a publication as well as individually yet in a collaborative way within our scene and working with some old friends of mine including <a title="Puma Yage TV's YouTube Channel" href="https://www.youtube.com/channel/UCHRS7NDZcLvvGkEGKF-fDpg">Puma Yage</a>.
<h2>My gear so far in 2014</h2>

I've temporarily made the app public, you can view it here if you want to take a look at the source: https://www.hammyhavoc.com/wp-content/plugins/wp-app-kit/app/index.html?wpak_app_id=hammy-havoc-ios#single/posts/929

Change themes' folder location

this issue has been created for changelog reference

We need to change the themes' folder location. Themes have to be outside the plugin's folder to allow plugin updates without impacting themes. Themes will be located in the wp-content folder.

Commits

Notice

I updated source code and when I edited my application, I just saw the following error:
Notice: Undefined index: with_subtree in (...)wp-content\plugins\wp-app-kit\lib\components\components-types\page.php on line 178

Splashscreen PhoneGap Plugin dependency

In core, it appears we use navigator.splashscreen.hide(). However support is clear that it needs the Splashscreen PhoneGap plugin. It means core is dependent on this core plugin. How do we handle that?

Secure Phonegap meta box

Displayed data is retrieved from several meta values, and are included as is into input and textarea attributes. I think we should secure a bit more this and escape these values to avoid someone being able to update metas to include some hacks into them.
Maybe there are some other similar cases to handle (other meta boxes), I just didn't search.

Online and offline events not fired

It appears that binding online and offline events doesn't work in functions.js. After a bit of search and help from the PGB support, the following minimal app works.

<!DOCTYPE html>
<html>
    <head>
        <script src="phonegap.js"></script>

        <script type="text/javascript">        

            function onLoad(){
                document.addEventListener("deviceready", onDeviceReady, false);
                document.addEventListener("online", onOnline, false);
                document.addEventListener("offline", onOffline, false);
            }

            function onDeviceReady() {
                 alert('device is ready');
            }

            function onOnline(){
                alert('Device is Online');
            }

            function onOffline(){
                alert('Device is Offline');
            }

        </script>

    </head>
    <body onload="onLoad()">
        Testing PGB solution
    </body>
</html>

We should implement that in the core and provide theme events to access offline and online events.

Themes' metadata

this issue has been created for changelog reference

Themes need metadata (eg. title, version, platform...) and these metadata have to be exposed in the application's Edit panel.

Commits

App.on('error') Not Fired

When network is not available or retrieving data from WS fails, refresh:end event if triggered. At the moment, we don't have the required feedback to know if the call has worked or not.

Apparently App.on('erroe') is never fired.

Component Slug Update

Adding a new component is easy. The plugin will take care of the corresponding slug by sanitizing the name, as WordPress is doing for new posts.
Problem is when the user edit a component, they are able to update the slug and then include all sorts of characters, even with accents or special ones. No sanitization will ever occur and this will lead to a broken component.

Maybe the solution is to force slug even when updating a component (user don't have the choice), or force the slug once forever at the creation (it's internal only, so why not?), or simply sanitize again at slug update.

Platform specific fields

We should dynamically show/hide fields that we know are platform-specific when the user chooses one of the available platforms (iOS / Android).

PhoneGap Build metabox - mandatory fields

We need to define which fields from "PhoneGap Build" metabox are "mandatory" for the corresponding checklist element to be "OK".
What I propose is the following:

  • application name
  • application id
  • version
  • PhoneGap version

What do you think?

Metaboxes help texts

We should define texts that show up in each metabox when the user clicks on the dedicated link.

Check If We're In Default Screen

Would be very useful to be able to check that we're displaying the default screen in functions.js.

I propose to use current_screen.is_default_screen for that (?).

Status bar config. is done after the layout is drawn

It appears that when using the StatusBar PhoneGap plugin, the status bar configuration is done after the splashscreen is hidden. Ideally, we should have a way to hook as early as possible (i.e. before the layout is done).

Add a POT file for plugin translation

POT file is basically a PO file with an empty translation.
This would help translators to create a new language for the plugin without having to re-parse the whole source, with the risk not to think of every parameters to catch all strings available.

"Post list" component : don't force to choose a taxonomy term

Right now, if I have a Custom Post Type and I want to create a component that just lists all posts in this CPT, it is not possible (without using hooks) because we necessarily have to choose a taxonomy term for the component to be valid.

I think that in the taxonomy terms dropdown, we should add something like a "None" (or "All" ? or "Don't filter by taxonomy term" ? ) choice.

Lionel I assign that to you because I feel like it is part of the new UI devs, but if not I can totally handle this after you finish your first version :)

PhoneGap plugins duplicates in config.xml

I've bumped into the following bug:

  • Have declared the status bar plugin manually in the Phonegap config.xml data metabox
  • It has resulted having 2 status bar declarations in the config.xml
  • PhoneGap Build didn't compile anymore raising an error

We should enhance the duplicate detection to avoid this case.

Default to single for page appears to be broken

  • Pick or create a theme with a single.html but no page.html
  • Add a page component (with no sub-pages) in the WordPress admin panel
  • Add the component to the navigation
  • Compile the app (iOS or Android)
  • Launch the app and access the page

x Page content doesn't show up

Expected result: page content shows up as app should default on the single.html template.

Second notice

Related to #9, I has this error too:
Notice: Undefined index: post_type in (...)wp-content\plugins\wp-app-kit\lib\components\components-types\page.php on line 180

Component Name Quote Escaping

Trying to add a new component with single or double quotes will lead to escaping problems.

Single quote: you will see a backslash before it into the name column and "Edit" input field.
Double quote: you will see a backslash before it into the name column and you will only see the backslash into the name "Edit" input fiel (everything else after backslash won't show up).

Static Calls For Non-static Methods

Hi all!

I started some tests and saw this type of error while trying to open synchronization URL:
( ! ) Strict standards: Non-static method WpakWebServiceCrud::read() should not be called statically in C:\wamp\www\wordpress\wp-content\plugins\wp-app-kit\lib\web-services\web-services.php on line 115

This is due to WpakWebServiceCrud methods which aren't declared as static but are only statically called (e.g. WpakWebServiceCrud::read()). I didn't check if any other class is concerned, but fix is really simple here :).

Will continue testing...

Help buttons in metaboxes

UI problem: help texts clutters the edit panel metaboxes

Proposed solution:

  • Display a Help me link on the upper right corner of each metaboxe content area (below title)
  • Clicking this Help me link displays help texts
  • When clicked the Help me label changes to Hide help texts
  • All help texts should be: font-size:13px;font-style:italic;color:#444

Space for hidden texts is not reserved to avoid strange white gaps between inputs. It implies that when texts are shown, the height of the metabox grows

Optional:

  • When focus is set to a text input
  • If help texts are displayed
  • Its help text should be highlighted in yellow (let's try background-color:#fffe96;)

wf-help-me-links---001

Based on https://github.com/lpointet/wp-app-kit/tree/feature_ui fork

Disable Web Bounce Effect

By default, the webview has a bounce effect (notably iOS). It has interfered with the scroll. We have to disable it by default using preferences in the config.xml.

By default an iOS config.xml file has to contain:

<preference name="DisallowOverscroll" value="true" />
<preference name="webviewbounce" value="false" />

By default an Android file has to contain:

<preference name="disallowOverscroll" value="true" />
<preference name="webviewbounce" value="false" />

Yes there is a subtle difference between the 2 (D and d of the disallowOverscroll).

See that link for more info: http://chrisgriffith.wordpress.com/2014/10/10/phonegap-development-mistakes-and-how-to-avoid-them/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.