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

📦 eslint-config 💬 Support more recent ES syntax #14

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

alfonsomunozpomer
Copy link
Member

Use babel-eslint instead of eslint to support later ES features (e.g. v2.0.0 of the experiments table uses class properties).

E.g. v2.0.0 of the experiments table uses class properties
@alfonsomunozpomer alfonsomunozpomer merged commit 7fe8aaa into master Feb 28, 2020
@alfonsomunozpomer alfonsomunozpomer deleted the eslint-config/switch-to-babel-eslint branch February 28, 2020 15:45
alfonsomunozpomer pushed a commit that referenced this pull request Sep 4, 2020
* Test real data

* Reformat FilterSidebar by pass cleaned facetGroups

* Clean up code style

* Clean checkbox facetGroups and clean up codes

* Reformat the FilterSidebar with tidy facet groups

* Reformat container and pass results to sidebar

* Clean up code style

* Add required props in test

* Remove unused commands

* Update snapshots

* Update testutils with markerGenes and species

* Add a test for hiding a facet shared by all result

* Clean up code

* Add a filter method remove facets shared by all

* Clean up codes, delete old methods

* Remove unused props

* Revert "Remove unused props"

This reverts commit f4f3042895711117220e3e164a9cf93685757597.

* Disable facets after intial search results

* Remove useless props and define propTypes

* Assign clearedFacets in constructor and clean code

* Reorganise demo pages and update experiments results/header components

* Fix linter warnings/errors

* Trim and update dependencies

* Fix typo on CheckboxOption.propTypes

* Fix test environment for fetch

* Remove facet markerGenes in TestUtils; move common facet to test data

* Remove closure for facet-trimming, we’re only running this once

* Add comment to see trimming of shared facets in action
alfonsomunozpomer pushed a commit that referenced this pull request Sep 4, 2020
* Add experiment card and title as test utils

* Amend container and list test with experiment card

* Update snapshots

* Add TableCard and TableHeader files as demo input

* Pass TableCard and TableHeader as props to loader

* Amend demo file to show a valid search result

* Add two packages and a updating snapshots script

* Reformat FilterList as a stateful component to …

make table title clickable for sorting the table content

* Add a sorting order state and arrow in header

* Add a pointer cursor css style in table header

* Add hover, transition, opacity CSS for headers

* Add a sortState to indicate user selected title…

and toggle up and down orders

* Clean up code and fix up a bug about sorting if no

same attributes in response as table header

* Clean up code, set a different id for selected ..

title

* Add attributes. corresponding to the titles in

 ExperimentTableHeader  Utils for testing user selections

* Add test for the user selection on table headers

* Update snapshots

* Clean up package by removing update snapshots

* Update package-lock

* Fix Eslint style issues

* Fix Eslint style in test files

* Amend EpisodesHeader to ExperimentTable structure

* Amend codes based on PR review

* Update snapshots and clean up codes

* Change sortState name, use lodash sort

* Update snapshots

* Update test props

* Generalize FilterList with new HeaderComponent

* Add a stylesheet for sorting icons

* Format TableHeader component comprehensively

* Adjust EpisodesHeader structure to the same as …

ExperimentTableHeader

* Update test utils and FilterList with new structured header

* Update snapshots

* Update webpack-dev-server package

* Change default sorting as markergenes

* Update test snapshots

* Fix bug on table sorting

* Rename click callback function and clean states

* Remove additional stylesheet

* Clean the onClick callback function and propTypes

* Add a test for sorting table by clicking header

* Update package-lock

* Update snapshots

* Resolved merge conflict by incorporate suggestions

commit be61714933a584b9a97aa5a09041cce7a23a9a10
Author: lingyun1010 <zhaolingyun1010@gmail.com>
Date:   Tue Mar 5 11:22:32 2019 +0000

    Resolved merge conflict by incorporating both suggestions.

commit ea29e4930c1e545d01e18aeb62b9c350f16eae09
Author: Lingyun Zhao <33519183+lingyun1010@users.noreply.github.com>
Date:   Mon Mar 4 14:57:24 2019 +0000

    Feature #162304903 remove facets shared by all results (#14)

    * Test real data

    * Reformat FilterSidebar by pass cleaned facetGroups

    * Clean up code style

    * Clean checkbox facetGroups and clean up codes

    * Reformat the FilterSidebar with tidy facet groups

    * Reformat container and pass results to sidebar

    * Clean up code style

    * Add required props in test

    * Remove unused commands

    * Update snapshots

    * Update testutils with markerGenes and species

    * Add a test for hiding a facet shared by all result

    * Clean up code

    * Add a filter method remove facets shared by all

    * Clean up codes, delete old methods

    * Remove unused props

    * Revert "Remove unused props"

    This reverts commit f4f3042895711117220e3e164a9cf93685757597.

    * Disable facets after intial search results

    * Remove useless props and define propTypes

    * Assign clearedFacets in constructor and clean code

    * Reorganise demo pages and update experiments results/header components

    * Fix linter warnings/errors

    * Trim and update dependencies

    * Fix typo on CheckboxOption.propTypes

    * Fix test environment for fetch

    * Remove facet markerGenes in TestUtils; move common facet to test data

    * Remove closure for facet-trimming, we’re only running this once

    * Add comment to see trimming of shared facets in action

* Remove conflict package-lock.json

* Create a new package-lock.json

* Revert "Create a new package-lock.json"

This reverts commit ca779a90c7c6f571ec0858b303ee20f3b13764c3.

* Update snapshot
alfonsomunozpomer pushed a commit that referenced this pull request Sep 10, 2020
* Test real data

* Reformat FilterSidebar by pass cleaned facetGroups

* Clean up code style

* Clean checkbox facetGroups and clean up codes

* Reformat the FilterSidebar with tidy facet groups

* Reformat container and pass results to sidebar

* Clean up code style

* Add required props in test

* Remove unused commands

* Update snapshots

* Update testutils with markerGenes and species

* Add a test for hiding a facet shared by all result

* Clean up code

* Add a filter method remove facets shared by all

* Clean up codes, delete old methods

* Remove unused props

* Revert "Remove unused props"

This reverts commit f4f3042895711117220e3e164a9cf93685757597.

* Disable facets after intial search results

* Remove useless props and define propTypes

* Assign clearedFacets in constructor and clean code

* Reorganise demo pages and update experiments results/header components

* Fix linter warnings/errors

* Trim and update dependencies

* Fix typo on CheckboxOption.propTypes

* Fix test environment for fetch

* Remove facet markerGenes in TestUtils; move common facet to test data

* Remove closure for facet-trimming, we’re only running this once

* Add comment to see trimming of shared facets in action
alfonsomunozpomer pushed a commit that referenced this pull request Sep 10, 2020
* Add experiment card and title as test utils

* Amend container and list test with experiment card

* Update snapshots

* Add TableCard and TableHeader files as demo input

* Pass TableCard and TableHeader as props to loader

* Amend demo file to show a valid search result

* Add two packages and a updating snapshots script

* Reformat FilterList as a stateful component to …

make table title clickable for sorting the table content

* Add a sorting order state and arrow in header

* Add a pointer cursor css style in table header

* Add hover, transition, opacity CSS for headers

* Add a sortState to indicate user selected title…

and toggle up and down orders

* Clean up code and fix up a bug about sorting if no

same attributes in response as table header

* Clean up code, set a different id for selected ..

title

* Add attributes. corresponding to the titles in

 ExperimentTableHeader  Utils for testing user selections

* Add test for the user selection on table headers

* Update snapshots

* Clean up package by removing update snapshots

* Update package-lock

* Fix Eslint style issues

* Fix Eslint style in test files

* Amend EpisodesHeader to ExperimentTable structure

* Amend codes based on PR review

* Update snapshots and clean up codes

* Change sortState name, use lodash sort

* Update snapshots

* Update test props

* Generalize FilterList with new HeaderComponent

* Add a stylesheet for sorting icons

* Format TableHeader component comprehensively

* Adjust EpisodesHeader structure to the same as …

ExperimentTableHeader

* Update test utils and FilterList with new structured header

* Update snapshots

* Update webpack-dev-server package

* Change default sorting as markergenes

* Update test snapshots

* Fix bug on table sorting

* Rename click callback function and clean states

* Remove additional stylesheet

* Clean the onClick callback function and propTypes

* Add a test for sorting table by clicking header

* Update package-lock

* Update snapshots

* Resolved merge conflict by incorporate suggestions

commit be61714933a584b9a97aa5a09041cce7a23a9a10
Author: lingyun1010 <zhaolingyun1010@gmail.com>
Date:   Tue Mar 5 11:22:32 2019 +0000

    Resolved merge conflict by incorporating both suggestions.

commit ea29e4930c1e545d01e18aeb62b9c350f16eae09
Author: Lingyun Zhao <33519183+lingyun1010@users.noreply.github.com>
Date:   Mon Mar 4 14:57:24 2019 +0000

    Feature #162304903 remove facets shared by all results (#14)

    * Test real data

    * Reformat FilterSidebar by pass cleaned facetGroups

    * Clean up code style

    * Clean checkbox facetGroups and clean up codes

    * Reformat the FilterSidebar with tidy facet groups

    * Reformat container and pass results to sidebar

    * Clean up code style

    * Add required props in test

    * Remove unused commands

    * Update snapshots

    * Update testutils with markerGenes and species

    * Add a test for hiding a facet shared by all result

    * Clean up code

    * Add a filter method remove facets shared by all

    * Clean up codes, delete old methods

    * Remove unused props

    * Revert "Remove unused props"

    This reverts commit f4f3042895711117220e3e164a9cf93685757597.

    * Disable facets after intial search results

    * Remove useless props and define propTypes

    * Assign clearedFacets in constructor and clean code

    * Reorganise demo pages and update experiments results/header components

    * Fix linter warnings/errors

    * Trim and update dependencies

    * Fix typo on CheckboxOption.propTypes

    * Fix test environment for fetch

    * Remove facet markerGenes in TestUtils; move common facet to test data

    * Remove closure for facet-trimming, we’re only running this once

    * Add comment to see trimming of shared facets in action

* Remove conflict package-lock.json

* Create a new package-lock.json

* Revert "Create a new package-lock.json"

This reverts commit ca779a90c7c6f571ec0858b303ee20f3b13764c3.

* Update snapshot
alfonsomunozpomer added a commit that referenced this pull request Sep 10, 2020
* Initial commit

* Add build badges

* Add dependencies

* Rename entry point and add polyfill

* Update demo page to use EBI VF v1.3

* Minimal component that shows an error message if communication with server fails

* Dummy push to kick off Travis

* Regenerate pacakge-lock.json as there was some cruft from packages not saved to package.json

* Typo and some rewording in the comment about Promise handling

* Merge branch 'master' of https://github.com/ebi-gene-expression-group/scxa-gene-search-results

* Don’t unfold the error and use it in the state as it is

* Test error boundary and loading/loaded workflow

* Merge branch 'master' of https://github.com/ebi-gene-expression-group/scxa-gene-search-results

* Renamed GeneSearchResults to FetchLoader The basic architecture is FetchLoader fetches data from server and passes it to the component that does the heavy lifting

* Container component that gets the data from FetchLoader and displays search results

* Initial draft of the left filtering sidebar

* Don’t trust Atom, it doesn’t know how to autocomment JSX

* Fix propTypes typo

* Rename test to match FetchLoader

* Stub component for the results list

* Make two entries to test the fetch and the component itself; add CSS modules; reindent

* Fix dependencies

* Add components that make up the sidebar with facet filters

* Add a crude component to display results, it’s basic but it does the job

* Rename the top level container and actually implement it

* Call the top level component after fetching data

* Simplify test set up

* Add tests for CheckboxFacetGroup

* Randomize each test making sure there’s at least one option in the facet

* Fix JSON payload when FetchLoader retrieves data for FilterList

* Add a few more tests for MultiselectDropdownFacetGroup

* Remove import of shallow, we’re just using mount

* Refactor some common methods and test data to TestUtils.js

* Ignore TestUtils.js in coverage

* Add tests for the left filter sidebar

* Use identity-obj-proxy to fix snapshot test in Travis CI

* Update snapshot

* Make select input element stretch with contents

* Huge code refactoring • Simplified logic and state management with Lodash • Props are flatter across components, only transformed where strictly needed • Removed ResultsList component, instead we pass a React Component used to visualise each element • Updated snapshots and tests

* Refactor demo components and data

* Add a component prop to FetchLoader

* Use backticks

* Add some flair to the demo ResultElementComponent

* Add documentation

* Add link to demo in README

* Fix an incorrect item in the test data

* Rename package name and prepare a potential first version

* Since facets are optional, just render the list of results if no valid ones are passed in

* Add test to ensure the sidebar doesn’t contain duplicates

* Replace double quotes with backticks

* Add tests for the FilterList component

* Minor rewording comments

* Fix URLs of build badges

* Fixed REDAME to match demo

* Changed package name to react-faceted-search.

* Merge pull request #1 from ebi-gene-expression-group/feature/157167501-search-endpoint

Feature #157167501 - Search endpoint

* 1.1.0

* 1.1.1

* Update snapshot

* Merge branch 'master' of https://github.com/ebi-gene-expression-group/scxa-faceted-search-results

* atlas-feedback@ebi.ac.uk is no more, the GDPR killed it

* 1.2.1

* Simplify scripts

* Remove pesky error message in tests

* Change header of results list to align results with filters

* 1.2.2

* Enclose loading and no results messages in Foundation grid divs

* 1.3.0

* Feature/157774516 disable filter options with no results (#2)

* Typo

* Fix prop types in demo result elements

* Beef up documentation

* Externalise CSS styles for input
This is only necessary when integrating the component with a framework
that styles the `input` elements. It also avoids problems with CSS
modules down the line.

* Migrate to Webpack 4 with webpack-command and webpack-serve; update deps

* Replace inline styles with styled-components

* Update snapshots

* Remove prop to hide facet group name It’s not being used at all

* Refactor prop types used by several components

* Split main component in a stateful container and a stateless results list
Both the list and the sidebar get the results list and the selected
facets, from which they can infer what should and shouldn’t be displayed

* Rename demo pages and Webpack entries to reflect new code structure

* Fix tests

* Remove leftovers of facet group name hiding

* Revert: display results message D:

* Don’t wrap FacetPropTypes in PropTypes.shape to make it extendible

* Add a disabled prop to facets to grey out or remove the facet

* The container is now in charge of enabling/disabling facets
This design centralises all state changes in one place. I think it’s
better than having a distributed state stored among different
components.

* DRY out components: FilterList goes back to being as dumb as before

* Fix FilterList tests

* Fix facet group tests

* Randomize test

* Sort facets alphabetically; fix tests
The test suite includes a flakey test: the id in the input elements
created by react-select change on subsequent runs. Pushing to see if it
happens in Travis as well.

* Fix tests for FacetedSearchContainer

* Infer episode facets from episodes

* Properly randomize test

* Test that disabled checkboxes are displayed but greyed out

* Update dependencies

* Rename pass-through result component class prop

* Fix test after renaming props

* More fine-grained control of adding/removing facets for edge cases
We need to also know it a facet is the first selected or last unselected
in a group to, besides the general case which wasn’t being considered.

* Another easy test and updated snapshots

* Update README

* 2.0.0

* Bugfix/157890882 wrap long labels (#3)

* Updated webpack server from 4.12.0 to 4.16.0

* Wrap long labels using 'wrap-whitespace' css attribute on multivalue label and modify column length for filters

* Update jest from 23.1.0 to 23.4.1

* Update snapshot for FacetedSearchContainer.js

* 2.0.1

* Update Webpack config to webpack-serve 2

* Update dependencies

* Support a server-provided “reason” field if there are no results

* Full-fledged example for rich search feature

* Update package-lock.json

* 2.0.2

* Reduce filter sidebar width in large screens, it was too wide

* 2.0.3

* Merge pull request #6 from ebi-gene-expression-group/chore/159855401-add-javascript-linter

Chore #159855401 - Add Javascript linter

* Correct the configure file

* Revert "Correct the configure file"

This reverts commit f924b03b44d795baf96edfaf34efe1fa70b50949.

* Update to latest dependencies and move to official Webpack 4 and Babel 7

* Remove webpack-serve leftovers

* Minor corrections to README file

* Feature #158145682 – Add info tooltips for each facet group (#7)

* Add tooltip for facetgroups \n Add tests to check if tooltip exists

* - Update tooltip logic to show only when there is
tooltip text in payload
- Add test to check if tooltip is there if there
is no tooltip text in payload

* Update react-select version to 2.1.0

* - Add separate UI test for
MultiselectDropdownFacetGroup and
CheckboxFacetGroup
- Remove spacing between css class names in
previous tests

* - Modify test and tooltip condition to handle
when JSON payload contains empty tooltip
description.

* - Format code according to coding standard
- Add id to react Select component
- Revert back to check null for tooltip text

* - Generate random group names to test checkboxFacetGroup component
- Added facetGroupNameDescription prop in FacetGroupPropTypes
- Format and ident checkboxFacetGroup.js file

* - Generate random group names to test multiselectDropdownFacetGroup component
- Removed unnecessary imports
- Format and ident multiselectDropdownFacetGroup.js file
- Rename test file according to the component name it is testing.

* - Fixed typo in test case description

* - Fixed typo errors and space after comma missed previously

* Give test data a bit more flair

* Reformat code and remove incorrect props

* Make some facets not have a tooltip text

* Randomize test data

* Update snapshots

* Update snapshots

* Feature #159265221 – Make component re-render on new props (#9)

* Refactor CalloutAlert to its own module

* Re-render on new props (i.e. when a new URL is requested)
Design and implementation after
https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#fetching-external-data

* 2.1.0-beta

* Feature #159265231 – Append gene IDs to search results header (#10)

* Use a callback instead of a string as (no) results header message with JSON payload as argument

* 2.2.0-beta

* Remove test import (accidentally left there)

* Improve alignment and font size of loading/no results messages

* 2.2.1-beta

* 2.3.0

* Remove config for webpack-serve

* Merge branch 'master' of https://github.com/ebi-gene-expression-group/scxa-faceted-search-results

* 2.4.0

* Feature #161750271 – Add headers to results (#12)

* Add a ResultsHeaderClass that is rendered on top of the results list

* Add headers to demo page

* Minor code clean-up

* 2.5.0-beta

* Clean code style

* 2.5.0

* Feature #162304903 remove facets shared by all results (#14)

* Test real data

* Reformat FilterSidebar by pass cleaned facetGroups

* Clean up code style

* Clean checkbox facetGroups and clean up codes

* Reformat the FilterSidebar with tidy facet groups

* Reformat container and pass results to sidebar

* Clean up code style

* Add required props in test

* Remove unused commands

* Update snapshots

* Update testutils with markerGenes and species

* Add a test for hiding a facet shared by all result

* Clean up code

* Add a filter method remove facets shared by all

* Clean up codes, delete old methods

* Remove unused props

* Revert "Remove unused props"

This reverts commit f4f3042895711117220e3e164a9cf93685757597.

* Disable facets after intial search results

* Remove useless props and define propTypes

* Assign clearedFacets in constructor and clean code

* Reorganise demo pages and update experiments results/header components

* Fix linter warnings/errors

* Trim and update dependencies

* Fix typo on CheckboxOption.propTypes

* Fix test environment for fetch

* Remove facet markerGenes in TestUtils; move common facet to test data

* Remove closure for facet-trimming, we’re only running this once

* Add comment to see trimming of shared facets in action

* Delete package-lock.json

* Feature #162416247 make search results titles clickable to sort (#13)

* Add experiment card and title as test utils

* Amend container and list test with experiment card

* Update snapshots

* Add TableCard and TableHeader files as demo input

* Pass TableCard and TableHeader as props to loader

* Amend demo file to show a valid search result

* Add two packages and a updating snapshots script

* Reformat FilterList as a stateful component to …

make table title clickable for sorting the table content

* Add a sorting order state and arrow in header

* Add a pointer cursor css style in table header

* Add hover, transition, opacity CSS for headers

* Add a sortState to indicate user selected title…

and toggle up and down orders

* Clean up code and fix up a bug about sorting if no

same attributes in response as table header

* Clean up code, set a different id for selected ..

title

* Add attributes. corresponding to the titles in

 ExperimentTableHeader  Utils for testing user selections

* Add test for the user selection on table headers

* Update snapshots

* Clean up package by removing update snapshots

* Update package-lock

* Fix Eslint style issues

* Fix Eslint style in test files

* Amend EpisodesHeader to ExperimentTable structure

* Amend codes based on PR review

* Update snapshots and clean up codes

* Change sortState name, use lodash sort

* Update snapshots

* Update test props

* Generalize FilterList with new HeaderComponent

* Add a stylesheet for sorting icons

* Format TableHeader component comprehensively

* Adjust EpisodesHeader structure to the same as …

ExperimentTableHeader

* Update test utils and FilterList with new structured header

* Update snapshots

* Update webpack-dev-server package

* Change default sorting as markergenes

* Update test snapshots

* Fix bug on table sorting

* Rename click callback function and clean states

* Remove additional stylesheet

* Clean the onClick callback function and propTypes

* Add a test for sorting table by clicking header

* Update package-lock

* Update snapshots

* Resolved merge conflict by incorporate suggestions

commit be61714933a584b9a97aa5a09041cce7a23a9a10
Author: lingyun1010 <zhaolingyun1010@gmail.com>
Date:   Tue Mar 5 11:22:32 2019 +0000

    Resolved merge conflict by incorporating both suggestions.

commit ea29e4930c1e545d01e18aeb62b9c350f16eae09
Author: Lingyun Zhao <33519183+lingyun1010@users.noreply.github.com>
Date:   Mon Mar 4 14:57:24 2019 +0000

    Feature #162304903 remove facets shared by all results (#14)

    * Test real data

    * Reformat FilterSidebar by pass cleaned facetGroups

    * Clean up code style

    * Clean checkbox facetGroups and clean up codes

    * Reformat the FilterSidebar with tidy facet groups

    * Reformat container and pass results to sidebar

    * Clean up code style

    * Add required props in test

    * Remove unused commands

    * Update snapshots

    * Update testutils with markerGenes and species

    * Add a test for hiding a facet shared by all result

    * Clean up code

    * Add a filter method remove facets shared by all

    * Clean up codes, delete old methods

    * Remove unused props

    * Revert "Remove unused props"

    This reverts commit f4f3042895711117220e3e164a9cf93685757597.

    * Disable facets after intial search results

    * Remove useless props and define propTypes

    * Assign clearedFacets in constructor and clean code

    * Reorganise demo pages and update experiments results/header components

    * Fix linter warnings/errors

    * Trim and update dependencies

    * Fix typo on CheckboxOption.propTypes

    * Fix test environment for fetch

    * Remove facet markerGenes in TestUtils; move common facet to test data

    * Remove closure for facet-trimming, we’re only running this once

    * Add comment to see trimming of shared facets in action

* Remove conflict package-lock.json

* Create a new package-lock.json

* Revert "Create a new package-lock.json"

This reverts commit ca779a90c7c6f571ec0858b303ee20f3b13764c3.

* Update snapshot

* Tidy up demo pages

* Add package-lock

* 2.6.0

* 2.7.0

* Fix bugs on default sortTitle passed by props

* 2.7.1

* Update to latest dependencies

* 2.8.0

* Assign selected facets as an empty array if null (#15)

* Assign selected facets as an empty array if null

* Update depdendencies and fix snapshot tests

Co-authored-by: amunozpomer <amunoz@ebi.ac.uk>

* Org-scope/rename packages

* 3.0.0

* Fix export

* 3.0.1

* Fix org name :(

* Fix lint issue

* Remove packaged fetch loader in favour of Atlas React Fetch Loader

* Require props without default values

* Reorganise demo pages

* Update dependencies

Co-authored-by: Monica Jianu <monica@ebi.ac.uk>
Co-authored-by: Monica Jianu <monicajianu@users.noreply.github.com>
Co-authored-by: Haider Iqbal <haideri@ebi.ac.uk>
Co-authored-by: lingyun1010 <zhaolingyun1010@gmail.com>
Co-authored-by: Lingyun Zhao <33519183+lingyun1010@users.noreply.github.com>
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.

1 participant