griddlegriddle / griddle-core Goto Github PK
View Code? Open in Web Editor NEWCore grid logic for Griddle
Core grid logic for Griddle
Right now if you run the test project, type in "boli" then remove the filter -- the next button doesn't appear until you filter again.
Un-checking all columns from settings hides the data within the table. When there are no settings checked, all columns should be visible.
Any commit that is a new release should kick off a deploy to npm
Some columns should not considered when filtering the data. This should be a property on columnProperties
like sortable called filterable
The current plugin has two example tests. We should cover every method using the two current tests as an example (or not if there's a better way)
It would be nice to keep everything in sync as much as possible. Greenkeeper seems like a nice way to go about this.
Add tests for the reducers.
We need to release this to npm even though it's far from finished
This packages needs an update for Babel, Karma-cli and Webpack. This also includes the updates on its dependencies.
Hey there,
I recently stumbled upon your work with griddle 1.0 and am very intrigued by it. I'm just wondering if the plug-in architecture you're using is based on prior work, or if it is something that you yourselves are pioneering.
Have you done a search of how other developers are building plugin-able architectures on top of redux?
I'm currently trying to create an IDE of sorts for biology, and so am looking for best practices when it comes to building a reusable, plug-in-based architecture with react+redux.
Thanks for your time,
Thomas
The sort methods should take an array of columns to sort by. The first item in the array would be the primary sort where the last would be of least importance.
actionCreators should be created also to achieve this functionality.
Take a look at LocalDataPlugin.filter
and add the ability to filter by individual columns as well as all columns.
We should probably take an array of columns into this method instead of just a single filter string. How I'm envisioning this working is that we would have an actionCreator for all filter / column filter -- each of the filters would get added to an array on the store. The LocalDataPlugin.filter would loop through this array and apply the filter against the state data. When the filter is cleared, it would clear out the array of filters and reset the data (again through an actionCreator that the store receives).
Write an example providing and override reducer to filter the data in a custom way. Ensure that this satisfies the ability to create custom filters. It may also be worthwhile to add a task to griddle-render to make it so custom filters can be applied on <Griddle />
definition rather than needing to pass in a custom reducer.
The base store will need to keep track of things like
columns: This is the array of all columns -- the values in the array should correspond to the name field in column metdata hash.
visibleColumns: Columns that should currently be displayed
hiddenColumns: The columns that should never appear (they are likely metadata or something).
columnMetadata: Properties that impact how the columns behavior or display properties
We can't copy one-for-one but take a look at js/properties/columnProperties
for an example.
ActionCreators for interacting with the columns. Maybe something like (but don't quote me on this ๐):
SHOW_COLUMN: Action.Name = columnName
HIDE_COLUMN: Action.Name = columnName
LOAD_COLUMNS: Action.Columns = [array, of, columns];
Helpers (again potential -- not concrete):
GetVisibleColumns: Gets the current visible columns
GetAllColumns:
GetHiddenColumns
GetMetaData(id): Gets the metadata for a specific column
After running griddle-render and setting up griddle-core (npm run watch
) and linking griddle-core into griddle-render, navigate to page 12 and type "boling" into the search box.
If you clear the filter and type "boling" again you get one result.
The expected result is that adjusting the filter would change which page a user is on. Write a test that covers this broken case and fix it (as well as test the front-end).
In griddle reducer it is applying plugin.components without ensuring that the particular plugin has components.
Add eslint and a section on readme.md about how contributors can run it. Tabs = 2 spaces ๐
Lets discuss making Griddle core simply the most basic functionality (basically it would just take whatever state / data you give it and return that. Would be useful for hooking up to data controlled elsewhere like a through ajax / relay). The code for managing all grid state locally should live in a plugin.
Thoughts?
This is currently added to position (in a not super clean way) but it belongs here instead.
Add a test to verify that invoking GRIDDLE_LOADED_DATA when a sort is set returns the data sorted.
Currently the webpack config for dev/dist is all in one file with branching logic to determine how the configuration should be built and exported. I'm proposing that we be kind of lame and break this apart into two separate config files. A couple of the reasons -- it should be easier to maintain down the road -- the configuration settings have 'some' similarities but are also quite different. Additionally, I would like to have everything running as npm scripts rather than grunt/gulp/whatever if possible (the docs project will likely remain in grunt -- this is going to be separate from the source so no big deal). We could write a script that sets the environment variables and calls webpack but that also seems overkill as opposed to 'dist': 'webpack --config dist.config.js'
.
It's possible I'm not thinking everything through which is why I'm labeling this as question initially :)
Update to babel 6 and verify that the module can still be used within griddle-connector and the main griddle modules.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.