Giter Site home page Giter Site logo

vaadin-core's Introduction

vaadin-core's People

Contributors

alvarezguille avatar artur- avatar bwajtr avatar jouni avatar legioth avatar limonte avatar manolo avatar marcushellberg avatar platosha avatar qtdzz avatar saulis avatar tehapo avatar tomivirkki avatar vaadin-bot avatar vicsstar avatar web-padawan avatar yuriy-fix 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  avatar  avatar  avatar  avatar  avatar  avatar

vaadin-core's Issues

vaadin-grid: updating while scrolling

Vaadin Grid looks great and fulfills many of our need for a data table. One issue I could not yet resolve is "flickering" while scrolling to new records. The actual flickering is not caused by the grid but by the elements shown, but the grid is the only thing that can help: when inserting something different than text (e.g. images) these elements might take a short time to load. On the other hand elements reused while scrolling probably animate to their new state when inserted at the other end. To avoid this kind of user-irritating effects I would like to increase the number of invisible rows / amount of invisible space when scrolling. Is this already possible? If no would it be easy to introduce? Or do you have another idea to allow data elements to initialize themselfes for some time before showing them to the user (at least for slow scrolling)?

ZIP package improvements

The current ZIP package is less than helpful for first time users.

Consider doing the following improvements:

  • Instead of having all the bower packages directly at the top level of the zip, contain them in one extra folder. Perhaps name the folder "bower_components", to familiarize that concept right away.
  • Add a readme file at the top level of the zip. We had this at some point, but it has gone missing.
    • Content of this readme needs more design.
    • Also, the readme should be in HTML format
  • Gather all element documentation (asciidoc) in a "docs" folder at the top level of the zip, and format them to HTML

At the same time, we could consider changing the way we publish the ZIP package. Instead of uploading it to vaadin.com servers, we could just use the GitHub release as the default place for the zip, and link to that from vaadin.com. We can get download stats from GitHub as well (easier than from vaadin.com, at least currently).

Add static code analysis to projects

We should bring in some static analysis and coding conventions to our projects.

Suggested tools:

  • JSHint for common JS errors.
  • JSCS for coding conventions.
  • polylint for common errors in Polymer code.

Atom has plugins for JSHint, JSCS and polylint, but unfortunately JSCS is still missing the feature to lint JS code inside HTML documents (AtomLinter/linter-jscs#110). Also the polylint plugin for Atom seems to be quite buggy.

Using JSCS from command-line does work with HTML documents via `--extract' flag:

$ jscs --extract vaadin-combo-box.html -p google .
...
One space required after "if" keyword at ./vaadin-combo-box.html :
   253 |
   254 |    _onArrowDown: function() {
   255 |      if(this.opened) {
----------------^
   256 |        this._focusedIndex = Math.min(this.$.selector.items.length - 1, this._focusedIndex + 1);
   257 |      } else {
...

Whether we're using these tools inside editor/IDE or not, we should still add these as part of our build process to catch errors at the latest on Travis build.

TODO:

use IDs for all sub-sections in documentation

Not all of the articles have IDS for bookmarking sections.

AsciiDoc does automatically generate IDs based on the titles, but title texts are subject to corrections, while IDs are usually more stable. The generated IDs also are not unique. This is not a big issue in Elements docs currently, as they are not compiled to the book or to other DocBook/PDF format, in which unique IDs are required (compilation fails if they are not unique). A possible future solution that would automate cross-document cross-reference resolution would also require that IDs are unique in the site scope.

Split layout element [💰7]

A basic split panel element, that allows the end user to divide an area in the UI to two sections with a certain ratio. The area can be divided either horizontally or vertically.

Existing work

There’s already a ready made element for Polymer 0.5, and it’s probably fairly easy to port for 1.0

https://github.com/Polymer/core-splitter

We should package that neatly, so that the developer doesn’t have to provide any of the layout attributes.

Features

  • Vertical or horizontal "orientation"
  • Only two "container" areas (limit the number of child elements to two)
  • "Container" areas can define min and max sizes, which limits the movement of the splitter bar
    • If there are conflicting rules, we need to define some way of resolving them

Code example

<!-- Vertical means that the panels are stacked vertically, 
     so there the split is top/bottom -->
<vaadin-split-panel vertical>
  <div style="min-height: 120px;">Top</div>
  <div style="flex: 1;">Bottom</div>
</vaadin-split-panel>

Mockup

screen shot 2016-06-08 at 16 16 10

The main <vaadin-split-panel> element would be a flex layout, and by default the contained elements be flexed equally to fill the whole element.

Only the first two child elements are renderer, others are ignored (removed/hidden?).

Extra features

  • Allow the splitter to be styled into a 1px divider, but still have a larger hit area
  • Click the splitter to collapse/expand either side of the split

"Cannot select falsey values(0, "", false)"

Hello, I'm using `<vaadin-combo-box" component in Polymer in our application. When we're binding the values, there are falsey values like numeric zero(o), empty string(""). However, when user tries to select these values, Vaadin control doesn't allow to select in the first attempt. But, if selected again, that option is selected. This is bug IMO. Any option, regardless of its value should be selected in first attempt.

I think the issue is that the control doesn't allow falsey values in JavaScript and considers them as default values.

We've checked this by changing the values to other values than falsey and it works. However, we cannot change the values. Is there any configuration option in the control by which we can tell Vaadin to not consider these values as default value?

Prototype an input element with Polymer 2 [🕔1d]

Use cases to implement:

  1. A custom input based on the native input, which uses a native input value. Think of a generic text input, like <paper-input>.
  2. A custom input based on the native input, which provides a different value from the input one. Think of a <vaadin-date-picker>, which formats a date in a human format in the input field, but gives an ISO-formatted date in the value property.
  3. A custom input not based on the native one. Think of a <paper-toggle-button>.

Known issue: FF errors when running angular2 app in browser-sync

Running an angular2 application using browser-sync or lite-server, for instance any application based in the angular quick start, would occasionally produce errors in Firefox causing the app to fail.

This is caused because a browser-sync bug, which messes up certain documented files in the bower_components having a commented block with the following pattern: /* ... <body> ... */.

Workaround: Create a bs-config.json in the root of your project folder with the following contents.

{
  "snippetOptions": {
    "ignorePaths": "bower_components/**/*.html"
  }
}

Collapsible panel (vaadin-details)

From @jouni on September 11, 2015 12:52

A component to show more content when the user requests it, usually by clicking the panel header to reveal more content below it.

Polymer Elements has iron-collapse which we can utilize, but we could provide a more polished element, since currently it requires some boilerplate to trigger the opening and closing, and doesn’t provide lazy-loading content for instance, and doesn’t provide any default styles for material design.

Suggested element name: vaadin-details (since HTML actually has a draft spec for this element named details).

UI Design

  • End user feature design (what does it do, responsive behavior, etc.)
  • Graphical design
  • Prototype implementation for automatic scrolling behavior on small screen devices
  • User testing for prototype

Technical design

  • Technical feature design
  • API design (element name, light dom api, etc.)
  • Keyboard navigation and screen reader support

Attachments on Google Drive (private):

vaadin-upload should not use iron-icons

the vaadin-upload polymer element imports vaadin-upload-icons which in turn imports iron-icons this breaks apps where the icons id is taken by a custom icon set.

Likewise, vaadin-upload-icons should implement its own set of icons, rather than importing the entire iron-icons set.

This will also drastically reduce file sizes.

Release menu-context 0.1.0

Proto Repos:

Bullet-points:

  • Target the entire WebComponent
  • Declarative API first
  • No mobile support
  • No built-in templating
  • Have for attribute and default to parent

Actions

  • Share new Repo
  • Code, Test, Samples, Doc
  • Travis, reviewable etc

Error encountered resolving symbol values statically

Someone would have a solution for this:
Error encountered resolving symbol values statically. Calling function 'PolymerElement', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function

Angular 2 documentation

  • Replace the obsolete Angular 2 integration page with instructions.
  • Verify that Charts documentation also links to correct place.
  • Beta label for the Angular 2 page.
  • Review by Magi required

React wrappers

Investigate if it’s possible to auto-generate React wrappers for Vaadin Components.

Unify READMEs’ instuctions about npm permissions

Currently there’re differences about npm install across our elements:

  • vaadin-grid’s README has both link to stackoverflow.com topic on resolving permission problems and a note about probable sudo requirement
  • vaadin-combo-box and vaadin-icons READMEs neither mentions sudo nor permission problems resolution topic

To get those unified I suggest to:

  1. Remove the sudo note from vaadin-grid README.
  2. Copy the link about resolving permission problems from vaadin-grid’s README to every other element’s. Or remove it from vaadin-grid as well.

Using sudo should not be recommended. It results in setting root-only restricted permissions on some npm package and cache directories, that could introduce even harder maintenance problems. Generally, it’s not our job to instruct users about permissions on their systems. For ex., neither polyserve nor web-component-tester READMEs, nor even gulp getting started docs mentions sudo. If we still want to help our users to get over npm permission issues, we’d better instruct them to fix global installs, to make them working without sudo.

Bundle-wide theming

This feature should make it easy for developers to customize the theme for Vaadin Components.

Polymer cross scope styling (custom properties and mixins) works well and feels natural for CSS developers, but it lacks some of the nice features from the Vaadin Framework Valo theme, like the automatically adjusting colors derived from a base color.

Size variations should be possible to do using standard CSS calc function.

We could try to add the missing color manipulation functions, similarly to what Polymer does with var. There’s a working draft specification for CSS which we should follow: http://dev.w3.org/csswg/css-color/#modifying-colors

User code:

v-button {
  --valo-base-color: blue;
}

v-button code:

:host {
  background-color: var(--valo-base-color);
  color: color( var(--valo-base-color) contrast(95%) );
  @apply(--v-button-theme);
}

The more advanced features like "bevel", "shadow" and "gradient" could simple be custom properties which are loaded using mixins from separate HTML imports. For example:

valo-3d-theme.html:

:root {
  --valo-base-color: orange;

  --valo-gradient: linear-gradient( 
      color(var(--valo-base-color) tint(5%)), 
      color(var(--valo-base-color) shade(5%))
  );

  --valo-bevel: 0 1px 0 0 color(var(--valo-base-color) tint(10%)),
               0 -1px 0 0 color(var(--valo-base-color) shade(10%));

  --v-button-theme: {
    background-image: var(--valo-gradient);
    box-shadow: var(--valo-bevel);
  }
}

Usage:

<link rel="import" href="valo-3d-theme.html">

Wishlist

Add any elements you would like to see us build as comments to this issue.

Form layout element [💰20]

An element which makes it easy to build common form layouts.

Core features

At minimum, it should provide a way to present field labels/captions on the left side of the field (or right side for RTL languages). When there is not enough horizontal space, the label should be moved on top of the field. The label width should be uniform for all rows in the layout, so that the left (or right on RTL) edge of the fields align. It should be possible to align the labels in the "label column" either left or right (right-aligned being the default perhaps).

It should be possible to layout fields in 2 columns (possibly more in the future if that is seen as a common use case), and some fields can span multiple columns. The columns should also wrap when horizontal space is limited.

It should be possible to divide the overall form into sections using section headers/dividers.

The fields can be any input element, such as text inputs, dropdowns, checkboxes, radio groups, sliders, etc.

The labels could be either "floating" or static. Floating labels probably don’t make much sense for the "column layout" version.

Mockups

Wide layout:

wide

Medium layout:

medium

Narrow layout:

narrow

More features

  • Required field indicators
  • Error indication/messages
    • At first, any field error indicators should be placed underneath the field (like paper-input does for instance). After that, it should be possible to move the error messages to the right side of the field, when the label is on the left side (and vice versa for RTL).
  • Help/description messages (similar as error messages, but these are always visible)
  • Form level error summary

Inspiration

A proof-of-concept example how required indicators, help/description and error messages could be shown, and how help/description/error messages and floating labels could work when the label is placed on the left side of the field: http://codepen.io/jouni/full/dcrAu/

You can also google for "form layout" to get inspiration.

Details dialog element

Draft for a possible new element, for creating modal views that show detailed information for a certain item.

Use case

We have a collection of items, from which we are only showing a certain subset of information. To view the complete details for an item, the user needs to navigate/drill-down to that specific item. Usually, that view also allows the user to edit the details of that particular item, save it, or delete it (basic CRUD operations).

Responsive UI proposal

The most common way of showing detail information in desktop applications is a modal dialog, where you have a title at the top and buttons on at the bottom of the dialog, and a possibly scrolling content area in between.

On small viewports, some UI patterns have become common, such as having the primary actions always visible in the title bar of the view. The view usually also slides in from the bottom or from the right.

screen shot 2016-06-08 at 15 28 25

We can create an element that offers this responsive behaviour “out-of-the-box”.

The best place to “dogfeed” this is the Expense Manager demo application, where we have this kind of drill-down view for the expenses.

MVP features

  • Responsive title placement
    • In the future, we might want to consider adaptive font-sizing as well, so that the title shrinks to a certain minimum size first, if it’s too large to fit, and truncates the title only after that.
  • Responsive button placement
    • All the buttons are optional
  • Responsive in/out animations

GridTree component

It would be awesome having an official GridTree component in Vaadin framework.

Nowadays only exists the GridTable and deficient Add-ons in case you need to show data in tree structures.

GridTable is quite slow to manage big data, and Grid is much faster than Table to render data on screen.

Context menu element [💰13]

Draft for a possible new element, for creating context menus for any part of the UI.

Definition

(A lot of this is also defined in the Material design "Menus" specs: https://material.google.com/components/menus.html)

A context menu is a list of options that depend on the context for which the menu is displayed. It can be a hierarchical list, and it can contain disabled items and dividers. It is commonly displayed as an overlay on top of the other page content.

screen shot 2016-06-08 at 11 46 36

A context menu usually contains less options than a regular menu, possibly only a relevant subset of actions from the full application menu for the given context. Otherwise the functionality is very similar.

A "context" can be pretty much anything, and the lowest level we can define technically is an HTML element (hierarchy). As this is intended to be a general purpose element, it is the application developer’s responsibility to provide the context dependent information for the menu.

Items

The items are usually clickable/actionable, and perform some action that targets the context, but they can also be purely informative. Some items can also be toggles (on/off, checked/unchecked), although that is a less common use case for context menus (but common for application menus).

screen shot 2016-06-08 at 13 17 44

Visually the items are usually short one line strings, but can also contain icons or multiline text. The visual formatting of the items should be the responsibility of the developer, but a simple default representation is provided.

screen shot 2016-06-08 at 13 24 16

Interaction

When a mouse is used for interaction, the context menu opens from the secondary mouse button or from ctrl+primary mouse button.

On touch devices, long press/touch will open it.

The user can navigate the menu using the keyboard arrow keys, and activate the items using the enter key.

The context menu should open relative to the mouse/touch coordinates (but always contained within the browser viewport). On small viewports, the context menu should open as an bottom/action sheet, and the coordinates are ignored.

screen shot 2016-06-08 at 13 33 21

The context should also be programmatically openable, so the developer can provide an explicit button to open it (useful for touch devices for example, to help discovery). In this situation, it should also be possible to specify the target location for the context menu (where it should open on the screen, for example beneath the button that triggers the context menu).

screen shot 2016-06-08 at 14 03 02

Other considerations

Specific places for a context menu:

  • Grid cells (header, footer, body) and rows (selected or focused)

Implementation ideas

By default, the context menu applies to it’s parent element (to the <body> element in this example), and listens events on that element that will trigger the menu (context-click/right-click or long-press):

<body>

<vaadin-context-menu>
  <vaadin-menu-item>Option 1</vaadin-menu-item>
  <vaadin-menu-item>Option 2</vaadin-menu-item>
  <vaadin-menu-item>Option 3</vaadin-menu-item>

  <vaadin-menu-item divider>Other options</vaadin-menu-item>

  <vaadin-menu-item toggle>
    <paper-item>
      <paper-item-body two-line>
        <div>Option 4</div>
        <div secondary>Another line for the option</div>
      </paper-item-body>
    </paper-item>
  </vaadin-menu-item>

  <vaadin-menu-item toggle>Option 5</vaadin-menu-item>
</vaadin-context-menu>

</body>

To target a specific element (hierarchy), use the "for" attribute. The "open" event could be a callback function that can provide the "context" object for the menu data binding.

  • Question: what if the callback needs to perform an async operation to able to provide the context info?
<paper-tabs id="my-tabs">
  <paper-tab>Tab 1</paper-tab>
  <paper-tab>Tab 2</paper-tab>
  <paper-tab>Tab 3</paper-tab>
</paper-tabs>

<vaadin-context-menu for="my-tabs" on-open="opened" on-item-click="itemClicked">
  <template is="dom-if" if="{{context.isTab}}">
    <vaadin-menu-item>Close Tab "[[context.tab.title]]"</vaadin-menu-item>
    <vaadin-menu-item>Close Other Tabs</vaadin-menu-item>
    <vaadin-menu-item divider></vaadin-menu-item>
  </template>
  <vaadin-menu-item>Open a New Tab</vaadin-menu-item>  
<vaadin-context-menu>

Features for MVP

  • Flat list of options (no hierarchy)
  • Mouse and touch interaction (no keyboard support yet)
  • Small viewport support (responsive)
  • Context dependent items

Menu list element

A draft design for a responsive menu list element.

The idea is to have a navigation menu, optionally two levels deep, which works nicely on small screens and with touch devices.

The menu might be filterable as well, but I haven’t considered how that would work on small viewports yet. Another idea is to have some sort of built-in features that support the developer in adding a search feature in the app.

Below are various layout ideas.

Large viewport/area for menu
desktop

Small viewport/area for menu
mobile

bug with data picker. close button not reappearing

the close ("x") button appears when i open a datetime picker.
But when i try it a 2nd time, the "x" button does not appear.

This is happening on the demos on your web page.
I am on Chrome latest on OSX btw

Provide WebJar distribution

There are many out there who are building their client side apps with JVM based languages like Scala (Scala.js) or Groovy (grooscript). All of them are using Maven/Gradle for dependency management and WebJars (http://www.webjars.org) to pull int the client side libraries.

We should also provide a WebJar with Vaadin core elements to allow people to build great client side apps with our elements with JVM languages as well.

Does the Vaadin Designer support Vaadin (web)Components?

I've found a demo video which seems to point to a 'yes' but it was not very clear.

So I'd like to know : does the Vaadin Designer lets you build with only web components (Vaadin Components) and particurarly for JavaScript dev only ? No server side components.

Thanks for clarification

vaadin-combo-box 1.0

This is the tracking issue for the first version of the vaadin-combo-box element:

Prototype phase

1.0

Future

  • Support for object types
  • Customizable filtering
  • Customizable <template> support for list items
    • Customizable CSS styles for list items
    • List items with columns (i.e. grid, using vaadin-grid)
  • Customizable <template> support for the selected item(s) in the input area
  • Multi-selection
  • Dynamic list of 0–99999 items, with lazy loading
  • Autocomplete/suggest feature
    • Is this just "no custom input allowed" + lazy loading?
  • Allow wrapping any "input" element?
  • Allow wrapping any "selector" element?
  • Establish a performance budget and setup tests for them
    • Track the the total KB of the HTML import
      • Fail the build if the size increases more than X KB in a commit
      • Fail the build if the total size exceeds X KB
    • Track the startup time of the component
      • The element should respond to user input within X seconds after page load

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.