Code Monkey home page Code Monkey logo

mdl-ext's People

Contributors

leifoolsen 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

mdl-ext's Issues

Implement mdlDowngrade_ to clean up event listeners

mdlext-accordion and mdlext-select adds evetn listeners. Must implement "mdlDowngrade_" and listen to "mdl-componentdowngraded" event to detach listeners before destruction. In SPA's "componentHandler.downgradeElements" must be called before removing MDL-nodes from DOM.

Lightboard layout

A lightboard, also known as a lightbox, is a translucent surface illuminated from behind, used for situations where a shape laid upon the surface needs to be seen with high contrast. In the "old days" of photography photograpers used a lightboard to get a quick view of their slides. The goal is to create a responsive lightbox design, based on flex layout, similar to what is used in Adobe LightRoom to browse images.

carousel: Focus slide on scroll

Improvement: The carousel should focus slide when it receives a scroll command.

  • first: focus first slide in list
  • last: focus last slde in list
  • scroll prev: focus leftmost slide in view
  • scroll-next: focus rightmost slide in view

Remove global CustomEvent polyfill.

Polyfilling the Customevent constructor for IE11 must be handled per module due to bug in the MDL framework.

Will use a strategy similar to what is provided i the Google Dialog Polyfill.

New feature: Image carousel

Create a MDL based carousel that advance or rotate images in a fixed space

Markup:

  • Use a list to hold each image to display (ul li figure img figcaption)

Features:

  • Navigate carousel using keyboard (arrow keys, tab, pgup, pgdown, home, end), mouse drag, touch or by sending custom events to the carousel (first, scroll-prev, prev, next, scroll-next, last, play, pause)
  • Select a particular image using enter or space key, or by clicking
  • Move images from right to left at a given interval; slideshow
  • Set slideshow interval via a data attribute or as a part of the play custom event
  • Stop slideshow via custom event (pause) or by a user interaction, e.g clicking an image
  • User interactions via keyboard or mouse may be blocked, if configured
  • Start slideshow at page load using a data attribute
  • The carousel should emit custom events reflecting a user action. E.g. clicking an image will emit a 'select' event with a detail object holding a reference to the selected image.
  • The carousel should pause any running animation on window.bur or tab.blur
  • The carousel should pause any running animation when carousel is not i viewport

Limitations:

  • Only horizontal layout in first release

sticky-header: Add CSS animation

The sticky header should not show or hide itself before abs(scroll distance) >= height of header. Then an animation effect should be used to show/hide the heaer.

Grid: Rewrite MDL-grid to use element queries in favour of Media-Queries

Element Queries are a new way of writing CSS styles so the rules apply to individual elements on the page, instead of to the whole page as one document like in regular CSS Media Queries.

References:

Will use eq.js since it works well with SASS, and element queries work without requireing a server to run.

Some alternatives:

Unfix #40

The focus outline removed in #40 should be reset to it's state before fix. The problem was that the client forgot to call componentHandler.upgradeElement(element, 'MaterialExtSelectfield') after inserting a selectield. Showing the focus outline provides a fallback if the upgradeElement method is not called.

Sticky header

A sticky header makes site navigation easily accessible anywhere on the page and saves content space at the same.

The header should auto-hide, i.e. hiding the header automatically when a user starts scrolling down the page and bringing the header back when a user might need it: they reach the bottom of the page or start scrolling up.

accordion: Add listeners for expand/collapse

A client should be able to send toggle messages to an accordion:

  • expand-all: sets all panels to "open" state
  • collapse-all: removes "open" state from panels
  • open(panel): set open state on a given panel
  • close(panel): removes "open" stat on a given panel
  • toggle(panel): toggles a panels "open" state

Lightboard: Use Element-Queries in favour of Media-Queries

Element Queries are a new way of writing CSS styles so the rules apply to individual elements on the page, instead of to the whole page as one document like in regular CSS Media Queries.

References:

Will use eq.js since it works well with SASS, and element queries work without requireing a server to run.

Some alternatives:

Accordion Secion Size

Hello Leif,

I played a bit with your accordion - nice work.
While in your examples the opend accordion sections are just big enough to contain their respective content, I somehow managed to create an accordion that always opens its section to the bottom of the browser window. Is there a way to influence this bevaviour deterministically?

Best regards, Bernd

color-themes: Use accent color for interactive elements

Material Design Lite uses primary color for interactive elements, which is not in line with the Material Design Color guide, https://www.google.com/design/spec/style/color.html#color-color-schemes.

According to the guide this is the correct use:

The accent should be used for the floating action button and interactive elements, such as:

  • Text fields and cursors
  • Text selection
  • Progress bars
  • Selection controls, buttons, and sliders
  • Links

The color-themes component should use the correct definition. All interactive elements in the color-themes component, except buttons, should use accent color.

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.