Coder Social home page Coder Social logo

table's People

Contributors

annabelsegalld2l avatar awikkerink avatar bearfriend avatar callum-mitchell avatar codebaboon avatar dabdullahd2l avatar dbatiste avatar devpow112 avatar dlockhart avatar jbydeley-d2l avatar josephsaffron avatar klhuff avatar maboelsoudd2l avatar margaree avatar mpharoah-d2l avatar njostonehouse avatar omsmith avatar ppaskaris-d2l avatar ryantmer avatar rylan avatar semantic-release-bot avatar stevenao avatar svanherk avatar tinglisd2l avatar

Stargazers

 avatar  avatar  avatar

Watchers

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

table's Issues

d2l-grid-actions component

A container for d2l-grid-action elements.

Requirements:

  • Selections (Added by d2l-grid or bound to this component)

Stick-element broken on chrome 56. Chrome rendering bug

First noticed by @omsmith

d2l_table_native_sticky

After some digging, it appears to be a rendering bug in Chrome. The "button" in the screenshot isn't clickable. Only the area highlighted by the dev tools is clickable.

Some other weirdness is going on. Removing the progress bar (specifically the element having the transition: transform) seems to "fix" things, sometimes.

Move styles to wrapper

Some of the styling is easier to do at the wrapper level. To keep the styles from being split between the table itself and the wrapper, move all the styles to the wrapper level.

Pros:

  • All styles in one place

Cons:

  • Custom styling of table needs to be done through d2l-table-wrapper instead of table[is="d2l-table"]

An alternative solution is to remove the need for d2l-table-wrapper. Either by:

  1. Using the ShadowDOM to create the wrapper. Most browsers don't seem to mind the presence of a wrapper in the table with shadyDOM, but it is still hacky and not correct HTML
  2. Create d2l-table-* elements.
  3. Another possibility is extending the template element. http://caniuse.com/#feat=template. This won't work on IE10,IE11 however.
  4. Using <tr><td><table>... It will be tricky tricking IE into accepting this

Tables with <dom-repeat> don't work in IE11

When folks are using d2l-table with a <dom-repeat> to iterate over their rows, the resulting shady DOM ends up being something like:

<table>
    <dom-repeat>
        <tr>...</tr>
    </dom-repeat>
</table>

Technically this is invalid DOM. It works in all browsers, except IE11.

We should look at alternate approaches to this, such as using a data-provider like approach similar to what vaadin-grid.

d2l-grid-row component

Requirements:

  • Styling to add to d2l-table
    • Header styling (repeated rows. Prefer inside thead)
    • Footer (Summary) styling
    • Cell alignment styling
  • Select button. For single select, use radio input type. For multi select, use checkbox input type
  • selected attribute indicates selection state. Bound to input's checked state
  • no-selection attribute disables input element creation. A blank td is created instead

This component's purpose is to add a checkbox table cell to the start of the row and fire appropriate events.

Difficulties:

  • A td can't be a child of a template body. The element will need to be created via Javascript

d2l-grid component

Requirements:

<d2l-grid type="data|list|nolines" has-selection multi page-size="1" page-num="1" on-sort="" on-page-change="" on-page-size-change="">
<d2l-grid-actions>
                <d2l-grid-action visible="{}">
                </d2l-grid-action>
            </d2l-grid-actions>
            <table>
                    <tr is="d2l-grid-row" selected visible="{}">
                        <td></td>
                        <td></td>
                    </tr>
            </table>
</d2l-grid>

Sticky buttons no longer work with Polymer 1.11.1

In Polymer 1.11.1, they made some changes to how direction selectors work:

Fix :dir selector to handle a few more complicated use cases

  • other-custom-element:dir()
  • :dir() in a shadowroot should behave like *:dir()
  • A few cases where the dir attribute is set between inside of a shadowroot

For whatever reason, those changes cause the sticky left/right buttons to no longer float.

Row header cells result in double border and extra rounded corners

If you use <th> as row headers, you end up with a double border on the right. Additionally, in the last row the first cell has rounded right corners.

Example:

<d2l-table-wrapper>
    <table class="d2l-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Value</th>
                <th>Cost</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th scope="row">Item 1</th>
                <td>1234</td>
                <td>$100</td>
            </tr>
            <tr>
                <th scope="row">Item 2</th>
                <td>5678</td>
                <td>$50</td>
            </tr>
        </tbody>
    </table>
</d2l-table-wrapper>

screen shot 2018-01-18 at 4 15 55 pm

Related to this, if the table doesn't have a header row, the first row's first cell has rounded right corners:

screen shot 2018-01-18 at 4 17 44 pm

Scroll actions rendered in the wrong position in Edge 16 with RTL

In Microsoft Edge 16, in RTL, the sticky scroll actions are rendered in the wrong position. Specifically, they are rendered far to the right. The click targets are still positioned in the correct place, and the buttons do work as if they were rendered in the correct place.

<d2l-offscreen> is likely causing the issue to manifest:

Microsoft is aware of this issue and it appears to be a defect in their position: sticky; implementation.

Bower component stickyfill not found

Builds have been failing on bower install with the following:
bower Stickyfill#master ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/seaneking/stickyfill.git", exit code of #128 fatal: remote error: Repository not found.

It looks like this fork is no longer accessible/no longer exists.

Anthony, I assigned this to you because it looks like you added this dependency in 4fb0228.

StickyFill dependency is included from bower_components

When I consume d2l-table from Bower in my own application, StickyFill comes down as a dependency into bower_components. However, if I then use something like Vulcanize to merge all my WCs into a single import, I end up with this in the compiled file:

<script src="../bower_components/Stickyfill/dist/stickyfill.min.js">

Obviously that file isn't going to exist wherever I publish my site, so I end up with 404s. A couple options here... we can somehow make Stickyfill more web-component friendly, or consumers are going to need to know that when they run Vulcanize, then need to embed all scripts with the vulcanize --inline-scripts flag.

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.