Code Monkey home page Code Monkey logo

ui's People

Contributors

abbadon1334 avatar acicovic avatar agileduncan avatar arrochado avatar bedengler avatar darkside666 avatar dependabot[bot] avatar fabulousgee avatar funyx avatar gartner avatar georgehristov avatar github-actions[bot] avatar gowrav-vishwakarma avatar ibelar avatar karakal avatar mayack avatar mhuser avatar mkrecek234 avatar mvorisek avatar ob6160 avatar philippgrashoff avatar pkly avatar romaninsh avatar samsouthardjr avatar skondakov avatar steveorevo avatar stokkeland avatar szepeviktor avatar thegrammernazi avatar thenetworkisdown 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

ui's Issues

0.3 Lister

Implement Lister and integration with Model

Change {tag} to {{tag}}?

Our templates are similar to Moustache, but we use single bracket format {foo}. At this point we can refactor to use {{foo}}, but only for the tags.

App->url() can't reference current page

App->url() can't reference current URL.

What if I want to just refer current URL and add some additional GET arguments.
For example, this won't work to get current page

$url = $app->url([null, ['new_id' => 123]]);

Hard dependency on Agile Data?

Arguments ๐Ÿ‘

  • more people will try Agile Data
  • can shift some code out (e.g. Form field population)
  • no need for MVC Controller
  • better conception (all data must live somewhere!)

Arguments ๐Ÿ‘Ž

  • unnecessary dependency, UI can work without Data.
  • can be more appealing for users, bigger exposure
  • better backwards compatibility

0.4 Semantic UI

Implement a bunch of basic views form Semantic UI (non interactive)

Create demo pages

UI reloading feature.

We require ability to create JS action from inside PHP that will re-load a component.

Dynamic loading of JS dependencies

It's possible for ATK loaders to load any dynamic content without anticipating what's inside. Loaded component may rely on 3rd party JavaScript code.

There should be a mechanism for 3rd party component to dynamically load JavaScript library and make sure it's fully loaded before initializing <script> code.

Scenario:

  1. UI contains a button that pops-up a new dialog
  2. Content contains a component that relies on on external JS code, e.g. Zoomcharts.com
  3. Zoomchart library is loaded dynamically (unless it was loaded previously)
  4. Zoomchart initialization code is executed.

WARNING: I have had problem with dynamic loading in the past in some situations for example WYSIWYG editors. Most jQuery based add-ons worked fine.

JS Libraries we could use...

We need to find a good JavaScript libraries to:

  • reloading parts of page through AJAX. jQuery.load() is a start, but we need loading progress, time-out handling and working with duplicate DIVs (replacing element itself not just it's content)
  • manipulating URL, so when AJAX load completes, we can update the URL as well as handle "back" button properly.
  • request authentication errors. Intercept jQuery requests and if they contain "non-authorized", then display message 'you have been logged off'

Minor Improvements to jsReload

Some things that need to be improved:

  • jsReloader should not delete current content until new content is loaded. Otherwise content collapses causing screen to scroll up.
  • jsReloader should accept additional parameters new jsReloader($view, ['foo'=>$bar])
  • $bar above should allow jsExpression
  • loader should show up only if loading takes longer than 1 second (over current content).

jQuery and jUniv are not implemented

  • Can't find in code where we actually use jQuery->_include and load jquery.min.js. In demos we have hard-coded <script src="https://code.jquery.com/jquery-3.1.1.js"></script>
  • Same story with jUniv - that's why $view->js()->univ()->reaload() doesn't work

Formatting data in form through special component.

When data is presented to the user, it needs to be formatted. Agile Data contains information about the type, and some meta information about the UI, but it does not contain logic for presenting data. That is a job of a User Interface.

For example, you may have a form field -> input, which will contain money, numeric, float etc. The field is theoretically the same, but the formatting logic is different.

๐Ÿ‘Ž Traditionally we would use Field_Money, which knew how to display money and how to store it in the database.

  • backward compatible
  • great control over presentation of money field
  • grid / lister can implement their own formatters on their own
  • we can support custom formatters for custom types

๐Ÿ‘ Alternatively we may introduce a new component just for formatting data. It can be used on Field_Line to display all sorts of things. It can also be used on Grid and Lister.

  • use same formatter everywhere
  • model can define formatters
  • multiple formatters can be combined like in grid, but anywhere
  • can invoke formatters in templates {name|uppercase}

Need to do research.

Add mechanism to include CSS / JS through a call to App

Some components may require additional CSS / JS includes to function. The "Application" class needs to some methods for this.

Example:

$this->app->includeJS('https://code.jquery.com/jquery-3.1.1.js');

Additional note here - ability to install and use bundled resources.

Do we need double-formatter support in Table/Grid?

Currently when you add column to grid, you can use:

$table->addColumn('name', new \atk4\ui\TableColumn\Link(['details.php?id={$id}']));

Columns contribute to formatting of the CELL but NOT DATA, so your "money" type will be formatted in 123,345.10 regardless. With existence of a Template (http://agile-ui.readthedocs.io/en/latest/grid.html#template) you already have a great deal of control over cell formatting. Finally you can extend TableColumn class and do more formatting yourself.

There may be cases, however, when multiple CELL formatters are necessary. For instance if you want to present "status" but also put a link over it. From the Agile UI perspective it complicates things, but if there are extensive use cases, then something like this could be implemented:

$grid->addColumn('rating', [
   new \atk4\ui\TableColumn\Template('{$rating} out of 10'),
   new \atk4\ui\TableColumn\Link('rate.php?id={$id}')
]);

I think this change can be done along with addition of un-named columns (e.g. radio boxes, actions, expanders etc).

Please provide your vote and comment below on a possible use-case I might have not considered

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.