Git Product home page Git Product logo

app-layout's People

Contributors

43081j avatar abdonrd avatar ahaasler avatar aomarks avatar astral-arsonist avatar bicknellr avatar blasten avatar dfreedm avatar diegohaz avatar e111077 avatar ebidel avatar felixzapata avatar frankiefu avatar garlicnation avatar keanulee avatar ktiedt avatar lozandier avatar mgiuffrida avatar notwaldorf avatar pdesjardins90 avatar rictic avatar robrez avatar rubenstolk avatar samuelli avatar shahraship avatar tedium-bot avatar timbrockman avatar timvdlippe avatar valdrinkoshi avatar zecat 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app-layout's Issues

app-drawer-layout content not resizing in IE

Hi,
When using an app-drawer inside an app-drawer-layout and we resize the page to make app-drawer disappear, the app-header is not resizing well.
Step to reproduce:

  1. Go in demo5.html in IE (I used IE 11 for my test)
  2. Click on explorer box to reduce windows size (The bug only appear in a one shot resize, not when resizing windows by the corner). The internet explorer window should be at a point that make the drawer disappear after clicking the resize button.
  3. We can see that the app-header doesn’t fill the remaining space of the drawer.

Screen shot:

image

Note: I do not only see this bug in app-header. In my app, I have an element that use iron-resize to take the width of the app-header-layout inside the app-drawer-layout and I got the same problem. It seems that the iron-resize event is trigger before the app-drawer have disappear.

carbon-router

What is carbon-router element? I cant find it anywhere

Should this be possible?

I tried with the help of an app-header-layout, an app-header and a couple of app-toolbars to do the following but I couldn't get it to work, should the following be possible?

  • top fixed height toolbar
  • bottom toolbar that starts off a certain size and then condenses to a smaller size on scroll

I could get the two toolbars, and the condense to smaller size but the top toolbar always scrolled off screen which is the one I wanted to stay put.

Thanks in advance

Make templates/publishing more reusable

I've previously talked to @justinfagnani about what we can do to make the publishing template more reusable out of the box 🏃.

Could we look at making the data for the below less coupled to the current implementation?

We already use an external JSON file for articles so maybe something similar for the rest of the app?

cc @robdodson who did https://github.com/PolymerLabs/zuperkulblog-progressive in case he has other thoughts here.

app-header width doesn't update

On Chrome desktop (and possibly other browsers), in layouts featuring app-header, if the scrollbar is added or removed, the width of the header doesn't update to reflect this.

To reproduce (although a bit tedious), go to Pesto, and with developer tools, delete cards until the scrollbar disappears.

White-space will remain where the scrollbar previously was.

Resizing the browser window fixes this, as does document.querySelector('app-header').resetLayout();, for example.

Is this a bug, or should I be calling resetLayout() after making changes to my page that could affect the scrollbar?

mini variant missing feature

Issue opened in PolymerElements/paper-drawer-panel#120

From spec

Mini variant

In this variation, the persistent navigation drawer changes its width. Its resting state is as a mini-drawer at the same elevation as the content, clipped by the app bar. When expanded, it appears as the standard persistent navigation drawer.

[…]

The mini variant is also an acceptable closed state for a temporary navigation drawer.

Would be a usefull feature, it's a challenge to have a fluid and logic transition. Any suggestions ?

app-header & app-header-layout enhancements

app-header-layout

  1. reset layout (fixes timing issue) - p0 - fixed by #84
resetLayout: function() {
  // this is cheap
  this._updateScroller();
  this.debounce('_resetLayout', function() {
    this._updateContentPosition();
    this._updateFixedNodesPosition();
});
  1. Mixin for the content - p0 - fixed by #84
#contentContainer {
  position: relative;
  overflow-y: hidden;
  @apply(--app-header-layout-content);
}

app-header

  1. snaps property. Let's allow a way to transition from state A to B without interpolating the values based on the scroll position. This is good for performance, and cleaner UX. - p0 - PR: #99
  2. compute the header transform Y position from the progress. This would make the implementation more cohesive - p1
  this._runEffects(progress, mayHeaderMove ? this._deltaHeight * progress : 0);
  this._transformHeader(mayHeaderMove ? this._deltaHeight * progress : 0);
  1. migrate to IronScrollTargetBehavior - p1
  2. a way to scroll without scroll transitions. aka :host-context(disabled-transition) p0
    Proposed API: Polymer.AppLayout.scrollTo(scrollLeft: Number, scrollTop: Number, target: Element?) -> void PR: #90

app-header-layout: Why paddingTop in _updateContentPosition?

In my layout, using app-header-layout, paddingTop is set in _updateContentPosition and it leaves a 65px gap at the top of my content, between the header and my content. If I comment out this line in then everything works as expected and my content fits exactly underneath the header: https://github.com/PolymerLabs/app-layout/blob/master/app-header-layout/app-header-layout.html#L175

I've created a temporary fork to continue work on my app, but can you give me a hint how I can get around this issue without commenting out this line of code?

main content is scrolled behind the drawer and scrim

To reproduce:

  • open app-layout/demo/demo2.html on mobile, e.g iPhone
  • try to touch scroll on the drawer

Observed:
the main content behind the scrim scroll.

Expected:
the main content behind the scrim should not scroll.

We used to have code in DocumentScrollBehavior to help decide shouldEnableDocScroll. The code is problematic and we commented that out. We need to find another solution to solve this.

better documentation on effects

We have quite a few effects (e.g. blend-background, parallax-background, resize-title...). But currently it is not clear to the users what do they need to setup in order to use them. For example, for the effect parallax-background, we expect the user to use the mixin --app-header-background-front-layer to set the background image. And for resize-title, the users need to put the attribute title on the node that represents the condensed title and resize-title attribute for "large" title.

We also need documentation on how to create custom effect.

Allow app-header to not be a direct children of app-header-layout

Hi,

I want to put my app-header in a polymer elements to use it across my application. However there are some functionality that doesn't work when doing that. For example, if i put the fixed attribute on the app-header, the header doesn't stay fixed in the page.

'reveals' problem in iPhone and iPad

Probably because of how the scroll works on these devices, <app-header reveals> seems weird. It doesn't reveals while scrolling, but only when scroll stops, causing the toolbar's position to flash.

Is this a known issue? Is there any solution?

app-drawer - position-fixed limits drop in use cases

  • Allow for position other than fixed
  • Animate width (maybe?) - to allow parent node to collapse around it.

What this allows for is 2 fold.

  1. app-drawer can now be dropped into an existing nav container and expand/collapse that container
  2. becomes a drop in replacement for non floating/blocking menus.

Performance improvement for app-drawer

Adding this line of css:
app-drawer #contentContainer{ will-change: transform; } greatly improves the transition animation of the app drawer. Especially on older mobile devices there is notable difference.

Preserve momentum when flicking drawer

Currently dragging and releasing the drawer will use a fixed transition each time, making the experience feel somewhat unresponsive and not as good as the native drawers. We should calculate the velocity based on the drag events and apply that for closing animation.

@media print rule needed in app-header-layout?

when using browser's native print, position: fixed header inside app-header-layout shows up.. in its current position w/ regard to document scroll pos.

eg:

  content
  content
--------------
Hai toolbar
--------------
  content

This rule added app-header-layout may be a good start..

  @media print {
    :host > ::content > app-header,
    :host > ::content > [underlay-content] {
      position: absolute;
    }
  }

Animations for the header

Scroll bar disapear when app-drawer is showing

When we open the drawer, the scroll bar disappear on the site’s content leading to app-header not resizing and unexpected issue on layout. For example, I have a layout with one item per row but when I open the app-drawer it displays on two rows because the scroll-bar disappear. You can see this problem in the demo2.html file when you are on a mobile size. Here is images of the bug in my app:

When the app drawer is close:

image

When I open the drawer:

image

You can see that the app-header have not resized and that the content is now display two card per rows.

More Behaviours too hook into and allow custom elements

Since Polymer no longer supports inheritance, may I humbly suggest leveraging Behaviors much more!

Please see: PolymerElements/paper-scroll-header-panel#50 (comment)

I felt completely trapped when I tried to compose my main layout from smaller blocks since they were all seemingly hardcoded to use specific elements, parent/child relationships and selectors.

Along the same lines, I'd also suggest using shared styles much more for the same reasons, to empower the developer to combine and compose as needed!

app-footer

It would be nice to have an app-footer component for footers and menus, etc...similar to app header but for the bottom of the screen...putting too much control in the header violates the thumbzone on mobile...

Replacing iron-pages with neon-animated-pages within a app-layout

When trying to modify the Pesto app, to use neon-animated-pages instead of iron-pages to do animated transitions between pages, i found 2 bugs:

  1. app-header does not resize correctly when stretching window, opening/closing drawer
  2. The navigate back button dissapears when going into detail view

"wide" parameter in function ?

Hi, in pattern > transform navigation, there is a function "onLayoutChange" that accepts parameter "wide", and then checks if it is true. Where did this parameter come from and where is it defined ?
onLayoutChange: function(wide) { if (wide && drawer.opened) { ... } }
I'm trying to understand how it works, thanks.

Pesto: header transitions should not happen when switching pages

  • If you’re on the homepage scrolled down such that the header is in a shrinked state, and then tap on a recipe to navigate to the recipe page, the header on the recipe page starts out green and then quickly fades to transparent. This feels like a jank.
  • If you’re on the homepage scrolled down such that the header is in a shrinked state, and then navigate to a recipe page, and then navigate back using the top-left back arrow, it appears that on that navigation back to the homepage the header is initially in its expanded state, before it quickly snaps back to its shrinked state. This feels like a jank.

We can now use Polymer.AppLayout.scroll({top: top, behavior: 'silent'}) to scroll to a position without running scroll effects. I think Pesto is using app-scrollpos-control so we can just fix it there.

changing app-scrim z-index?

is there a way to style the app-scrim inside the app-drawer-layout with a custom property? Because the z-index is quite low, I have other elements on my page which are appearing above it now.

0.0.15 breaks paper-dialog with backdrop

When I upgraded to master - paper-dialog shows up behind the overlay backdrop and is not accessible. Downgrading to 0.0.14 fixed the problem. Wanted to let you know, unfortunately I don't have the time to debug. Loving app-layout btw :)

header-layout: problems w/ tab order

When using app-header-layout, if any element in the main content area (#contentContainer) has a tabindex, it will receive focus before anything inside the app-header.

You can see this occur via app-layout/templates/shrine/index.html

Here is some example code (slightly modified app-layout/demo/demo2.html) --

    <app-header-layout>

      <app-header fixed effects="waterfall">
        <app-toolbar>
          <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
          <div spacer title>My Drive</div>
          <button id="one">Focus me first?</button>
        </app-toolbar>
      </app-header>

      <div content>
        <sample-content size="100"></sample-content>
        <button id="two">Wrong focus order</button>
      </div>

    </app-header-layout>

I've only been able to workaround this by moving #contentContainer such that is the last element in app-header-layout and assigning explicit z-indexing in the css rules to ensure contentContainer always scrolls below the header.

edit explicit z-indexing screws up some things throughout the app. one example is paper-checkbox's ink focus behavior showing up behind the content

Drawer swipe

I find this to be much faster than the standard layout on browsers other than Chrome (where Chrome seems to perform just as well on both), however I miss being able to swipe in the side drawer.

Is this a feature that's likely to be implemented? I notice on the Polymer docs site that you can swipe to close the drawer, but not open.

Is this a feature that you're likely to implement?

Thanks!

app-drawer-layout considerations

From: PolymerElements/paper-drawer-panel#121

From the spec, the drawer can be

  • permanent

    Recommended default for desktop

  • persistent #103

    Persistent navigation drawers are acceptable for all sizes larger than mobile.

  • temporary

    Recommended for:
    Tablet
    Required for:
    Mobile

So I propose some changes on attributes :

  • replace "responsiveWidth" by "tabletWidth" and "mobileWidth"
  • replace "narrow" by "mobile", "tablet" and "desktop"
  • remove "forceNarrow"
  • add "tabletMode" and "desktopMode" ( = "permanent" | "persistent" | "temporary")

After recent update, "Uncaught TypeError: Cannot set property 'opened' of undefined".

Getting errors in console, and the drawer doesn't appear at all, neither does the related hamburger button:
Uncaught TypeError: Cannot set property 'opened' of undefined
(anonymous function) @ app-drawer-layout.html:188
Debouncer.complete @ polymer-mini.html:2097
boundComplete @ polymer-mini.html:2076
Polymer.Async._atEndOfMicrotask @ polymer-mini.html:2053
window.MutationObserver.observe.characterData @ polymer-mini.html:2068

The anonymous function points to:
resetLayout: function() {
....
-> this.drawer.opened = !this.narrow;
....

err1
err2

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.