Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[KED-1650] New graphing algorithm & feature flags (#185)
* Remove unnecessary null props * Don't use a button for node-list-row when !onClick There's no onClick event, so the button element is unnecessary * Remove unused modifier classes * Add --button modifier class for row hover state * Combine duplicate classes and remove unused * Add new selected node state This to distinguish clicked (i.e. selected) from active (i.e. hovered/focused) * Improve consistency of row transitions * Prevent a node being selected when disabled * Remove node clicked state when disabled * Fix node-list-row button styling * Use disabled button instead of text * Fix icon opacity when disabled * Fix tests * Add a new test for TOGGLE_NODES_DISABLED reducer Check that it sets nodeClicked to null if the selected node is being disabled * Fix node-list hover/selected bg colours * [KED-989] Added new graphing approach concept * [KED-1650] Refactor and tidy graph code * [KED-1650] Improve graph concept * [KED-1650] Refactor graph concept * [KED-1650] Refactor graph concept * [KED-1698] Add layers to graph concept and improve layout * [KED-1697] Added feature flags with flag for graph concept * [KED-1650] Refactoring, add comments and docs * [KED-1650] Added tests and some refactoring * [KED-1650] Fix exception object * [KED-1698] Fix layer constraints * [KED-1650] Change flags URL format * [KED-1650] Refactor and simplify * [KED-1650] Improve code clarity * [KED-1650] Add empty value for flags * [KED-1650] Improve routing * [KED-1698] Fix layer solving * [KED-1650] Update readme with flags * [KED-1650] Update license info * [KED-1650] Update readme * [KED-1650] Update license info * [KED-1650] Update license info * [KED-1650] Update readme * [KED-1650] Improve clarity Co-authored-by: Richard Westenra <rjwestenra@gmail.com>
- Loading branch information
1 parent
7351f68
commit 5ed4903
Showing
28 changed files
with
2,045 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
========================= | ||
The Kiwi licensing terms | ||
========================= | ||
Kiwi is licensed under the terms of the Modified BSD License (also known as | ||
New or Revised BSD), as follows: | ||
|
||
Copyright (c) 2013, Nucleic Development Team | ||
|
||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
Redistributions in binary form must reproduce the above copyright notice, this | ||
list of conditions and the following disclaimer in the documentation and/or | ||
other materials provided with the distribution. | ||
|
||
Neither the name of the Nucleic Development Team nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
About Kiwi | ||
---------- | ||
Chris Colbert began the Kiwi project in December 2013 in an effort to | ||
create a blisteringly fast UI constraint solver. Chris is still the | ||
project lead. | ||
|
||
The Nucleic Development Team is the set of all contributors to the Nucleic | ||
project and its subprojects. | ||
|
||
The core team that coordinates development on GitHub can be found here: | ||
http://github.com/nucleic. The current team consists of: | ||
|
||
* Chris Colbert | ||
|
||
Our Copyright Policy | ||
-------------------- | ||
Nucleic uses a shared copyright model. Each contributor maintains copyright | ||
over their contributions to Nucleic. But, it is important to note that these | ||
contributions are typically only changes to the repositories. Thus, the Nucleic | ||
source code, in its entirety is not the copyright of any single person or | ||
institution. Instead, it is the collective copyright of the entire Nucleic | ||
Development Team. If individual contributors want to maintain a record of what | ||
changes/contributions they have specific copyright on, they should indicate | ||
their copyright in the commit message of the change, when they commit the | ||
change to one of the Nucleic repositories. | ||
|
||
With this in mind, the following banner should be used in any source code file | ||
to indicate the copyright and license terms: | ||
|
||
#------------------------------------------------------------------------------ | ||
# Copyright (c) 2013, Nucleic Development Team & H. Rutjes. | ||
# | ||
# Distributed under the terms of the Modified BSD License. | ||
# | ||
# The full license is in the file COPYING.txt, distributed with this software. | ||
#------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { CHANGE_FLAG } from '../actions'; | ||
|
||
function flagsReducer(flagsState = {}, action) { | ||
switch (action.type) { | ||
case CHANGE_FLAG: { | ||
return Object.assign({}, flagsState, { | ||
[action.name]: action.value | ||
}); | ||
} | ||
|
||
default: | ||
return flagsState; | ||
} | ||
} | ||
|
||
export default flagsReducer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createSelector } from 'reselect'; | ||
|
||
const getFlagsState = state => state.flags; | ||
|
||
/** | ||
* Get current flag status from state | ||
*/ | ||
export const getCurrentFlags = createSelector( | ||
[getFlagsState], | ||
flags => ({ ...flags }) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { getCurrentFlags } from './flags'; | ||
|
||
describe('getCurrentFlags function', () => { | ||
it('should return the current flags from state', () => { | ||
const flags = getCurrentFlags({ | ||
flags: { mockFlagA: true, mockFlagB: false } | ||
}); | ||
expect(flags).toEqual({ mockFlagA: true, mockFlagB: false }); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.