Skip to content

Commit

Permalink
Merge pull request #2 from geostreams/release/3.4.0
Browse files Browse the repository at this point in the history
Release/3.4.0
  • Loading branch information
lmarini authored Aug 27, 2020
2 parents 424bf6d + 4a5219d commit 4df27f2
Show file tree
Hide file tree
Showing 219 changed files with 28,359 additions and 26,343 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ lerna-debug.log
/tmp
build
node_modules
package-lock.json
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [3.4.0] - 2020-08-27
- See `gd-core/CHANGELOG.md`, `gd-glm/CHANGELOG.md` and `gd-glm_old/CHANGELOG.md` for changes.

## [3.3.0] - 2020-06-18
This version marks the migration to [Lerna](https://lerna.js.org). See submodules for specific changelogs.

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ Everything else that is only relevant to one or two specific projects should go
| Projects should only have containers, each container is a folder or file containing all the relevant code for one specific view | This way, all parts of a view are in one place, which should make it easier to follow the relations between different sections of a view. |
| Each project container should connect to the store only in its entry point, i.e. the `index.jsx` file in its folder. All other sections of a container should receive the data and event handlers they need through their props. | This way, other parts of a view than its entry file can be wrapped and used in other places. For example, we can create a React Native wrapper in the same folder that uses the same parts. |
| Where possible, try to use pure functions for React components/containers instead of `Component` class. | Pure functions are more performant and easier to debug. It should be possible to write most views with them by using [React hooks](https://reactjs.org/docs/hooks-overview.html), which provide similar features as class context and state for functions. |
| Redux store should be an [Immutable.JS](https://immutable-js.github.io/immutable-js/) objects.<sup>1</sup> These objects can be converted back to JS objects in `mapStateToProps`, or passed and used as they are throughout the view. The latter approach is recommended. | From redux website: "Immutable-focused libraries such as Immutable.JS have been designed to overcome the issues with immutability inherent within JavaScript, providing all the benefits of immutability with the performance your app requires." See [redux website](https://redux.js.org/recipes/using-immutablejs-with-redux/) for more info. |
| Updates to containers and components internal state must happen in a safe way. If you need to use a current value in the state for updating the state, use the callback function provided by `setState`. | Syntax like `this.setState({ activeCategory: !this.state.activeCategory })` are not safe, because the value of `activeCategory` might change while it's being used. |
| Consult the linters rules and their description when you see a linting warning. <sup>2</sup> | Though most of the linting rules are subjective and mainly recommendation to make the code more readable, many of them are there to prevent logical errors and unintentional bugs, e.g. `no-nested-ternary`. |

Expand Down
9 changes: 9 additions & 0 deletions gd-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [3.4.0] - 2020-08-27
### Added
- Stacked Bar Chart
[GEOD-1341](https://opensource.ncsa.illinois.edu/jira/browse/GEOD-1341)

### Changed
- Improved Box Plot component
[GEOD-1341](https://opensource.ncsa.illinois.edu/jira/browse/GEOD-1341)

## [3.3.0] - 2020-06-18

### Added
Expand Down
22 changes: 5 additions & 17 deletions gd-core/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,11 @@ type Props = {
pathname: string;
}

const App = ({ routes }: Props) => {
// TODO remove this after porting all the __old code. This is a hack to disable and enable view specific stylesheets so the old and new styles do not conflict with each other.
for (let i = 0; i < document.styleSheets.length; i += 1) {
const styleSheet = document.styleSheets[i];
styleSheet.disabled =
(
!window.location.pathname.startsWith('/geostreaming/') ||
window.location.pathname.startsWith('/geostreaming/__new')
) &&
(!!styleSheet.href && styleSheet.href.indexOf('main') > -1);
}
return Object
.entries(routes)
.map(([path, props]) => (
<Route key={path} path={path} {...props} />
));
};
const App = ({ routes }: Props) => Object
.entries(routes)
.map(([path, props]) => (
<Route key={path} path={path} {...props} />
));

const mapStateToProps = (state) => ({
pathname: state.router.location.pathname
Expand Down
4 changes: 2 additions & 2 deletions gd-core/src/components/Carousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import PlayIcon from '@material-ui/icons/PlayArrow';
import RadioButtonCheckedIcon from '@material-ui/icons/RadioButtonChecked';
import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked';

import hooks from '../utils/hooks';
import { useInterval } from '../utils/hooks';

const useStyle = makeStyles({
container: {
Expand Down Expand Up @@ -71,7 +71,7 @@ const Carousel = ({
const [isPaused, togglePause] = React.useState(startInPause);
const childrenCount = React.Children.count(children);

hooks.useInterval(
useInterval(
() => {
if (activeIndex === childrenCount - 1) {
updateActiveIndex(0);
Expand Down
Loading

0 comments on commit 4df27f2

Please sign in to comment.