Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: EpicTable component. #189

Merged
merged 1 commit into from
Nov 7, 2019
Merged

feat: EpicTable component. #189

merged 1 commit into from
Nov 7, 2019

Conversation

MrHus
Copy link
Contributor

@MrHus MrHus commented Oct 31, 2019

The EpicTable is a table based on Andrew Colyle's article
"Design better data tables" which can be found here:
https://uxdesign.cc/design-better-data-tables-4ecc99d23356

The features the EpicTable supports:

  1. Fixed headers which follow the user.
  2. A fixed left column which follows the user.
  3. Optionally a fixed right column which follows the user.
  4. Expanding rows which can contain extra data.
  5. Click to go to details inside of the table.
  6. Selection of rows, and a select all.
  7. Filtering per column.
  8. Resizing of columns.
  9. Multiple headers

@MrHus MrHus requested a review from jvhoven October 31, 2019 12:44
@jvhoven
Copy link
Contributor

jvhoven commented Oct 31, 2019

Warnings
⚠️

Changes were made to package.json, but not to yarn.lock.
Perhaps you need to run yarn install?

Messages
📖 👍 Jest tests passed: 356/356 (0 skipped)

New dependencies added: overlayscrollbars, overlayscrollbars-react, react-is and @types/overlayscrollbars.

overlayscrollbars

Author: KingSora | Rene Haas

Description: A javascript scrollbar plugin which hides native scrollbars, provides custom styleable overlay scrollbars and keeps the native functionality and feeling.

Homepage: https://kingsora.github.io/OverlayScrollbars

Createdalmost 2 years ago
Last Updated27 days ago
LicenseMIT
Maintainers1
Releases28
Keywordsoverlayscrollbars, custom, scrollbar, scrollbars, scroll and frontend
This README is too long to show.

overlayscrollbars-react

Author: KingSora | Rene Haas

Description: OverlayScrollbars wrapper for React.

Homepage: https://kingsora.github.io/OverlayScrollbars

Created3 months ago
Last Updated27 days ago
LicenseMIT
Maintainers1
Releases2
Keywordsoverlayscrollbars and react
README

React OverlayScrollbars

React OverlayScrollbars Downloads License

Example   •   Documentation   •   FAQ

The official OverlayScrollbars wrapper for React.

Installation

npm install overlayscrollbars-react

Peer Dependencies

OverlayScrollbars for React has the following peer dependencies:

npm install overlayscrollbars
  • The React framework: react
npm install react

TypeScript

npm install @types/overlayscrollbars

Since this wrapper is written in TypeScript it comes with its generated typings.

Check out the recommended tsconfig.json options.

Usage

CSS

You have to import the OverlayScrollbars.css by yourself.

The component doesn't do it for you as the styles are global styles!

There are different ways to achieve this, in React the most simple way for me was to add this line in the index file:

import 'overlayscrollbars/css/OverlayScrollbars.css';

Import

Simply import the component into your file(s):

import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';

Template

After the import you can use it in JSX:

<OverlayScrollbarsComponent>
  example content
</OverlayScrollbarsComponent>

Properties

Two properties are accepted: options and extensions.

  • The options property accepts a object and can be changed at any point in time, and the plugin will adapt.
  • The extensions property accepts a string, string array or object and is only taken into account if the component gets mounted.
<OverlayScrollbarsComponent
  options={{ scrollbars: { autoHide: 'scroll' } }} 
  extensions={['extensionA', 'extensionB']}
>
</OverlayScrollbarsComponent>

You can read more about the options object here, extensions are documented here and here.

Instance

If you get the component reference, it provides two methods: osInstance() and osTarget().

  • The osInstance() method returns the OverlayScrollbars instance of the component, or null if the instance isn't initialized yet or already destroyed.
  • The osTarget() method returns the native html element to which the plugin was initialized, or null if the the component isn't mounted yet or already unmounted.

Example App

In case you need a example app for reference, you can use the example app in this repo(example folder):

If you wanna build the example app, run these commands:

npm run setup
npm run build
npm run example

License

MIT

react-is

Author: Unknown

Description: Brand checking of React Elements.

Homepage: https://reactjs.org/

Createdabout 2 years ago
Last Updated14 days ago
LicenseMIT
Maintainers9
Releases98
Keywordsreact

@types/overlayscrollbars

Author: Unknown

Description: TypeScript definitions for OverlayScrollbars

Homepage: http://npmjs.com/package/@types/overlayscrollbars

Created10 months ago
Last Updated1 day ago
LicenseMIT
Maintainers1
Releases4
Direct Dependencies
README

Installation

npm install --save @types/overlayscrollbars

Summary

This package contains type definitions for OverlayScrollbars (https://kingsora.github.io/OverlayScrollbars).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/overlayscrollbars

Additional Details

  • Last updated: Mon, 29 Jul 2019 21:34:42 GMT
  • Dependencies: none
  • Global values: OverlayScrollbars

Credits

These definitions were written by KingSora https://github.com/KingSora.

Generated by 🚫 dangerJS against 5bc722b

@codecov
Copy link

codecov bot commented Oct 31, 2019

Codecov Report

Merging #189 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #189   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          49     62   +13     
  Lines        1239   1337   +98     
  Branches      227    237   +10     
=====================================
+ Hits         1239   1337   +98
Impacted Files Coverage Δ
src/core/ContentState/ContentState.tsx 100% <ø> (ø) ⬆️
...ble/EpicTable/rows/EpicDetailRow/EpicDetailRow.tsx 100% <100%> (ø)
...le/EpicTable/widgets/EpicExpander/EpicExpander.tsx 100% <100%> (ø)
.../table/EpicTable/widgets/EpicDetail/EpicDetail.tsx 100% <100%> (ø)
src/table/EpicTable/rows/EpicRow/EpicRow.tsx 100% <100%> (ø)
src/table/EpicTable/widgets/EpicSort/EpicSort.tsx 100% <100%> (ø)
src/table/EpicTable/cells/EpicCell/EpicCell.tsx 100% <100%> (ø)
...icTable/cells/EpicHeader/EpicResize/EpicResize.tsx 100% <100%> (ø)
...EpicTable/rows/EpicExpanderRow/EpicExpanderRow.tsx 100% <100%> (ø)
.../EpicTable/cells/EpicCellLayout/EpicCellLayout.tsx 100% <100%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50f970a...5bc722b. Read the comment docs.

@MrHus MrHus force-pushed the feature/epic-table branch 8 times, most recently from a941eef to 89aefae Compare November 4, 2019 08:29
@MrHus MrHus force-pushed the feature/epic-table branch 3 times, most recently from 370579a to bb8ab7f Compare November 6, 2019 15:26
The EpicTable is a table based on Andrew Colyle's article
"Design better data tables" which can be found here:
https://uxdesign.cc/design-better-data-tables-4ecc99d23356

The features the EpicTable supports:

  1. Fixed headers which follow the user.
  2. A fixed left column which follows the user.
  3. Optionally a fixed right column which follows the user.
  4. Expanding rows which can contain extra data.
  5. Click to go to details inside of the table.
  6. Selection of rows, and a select all.
  7. Filtering per column.
  8. Resizing of columns.
  9. Multiple headers
@MrHus MrHus merged commit 84d9283 into master Nov 7, 2019
@MrHus MrHus deleted the feature/epic-table branch February 3, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants