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

PXD-1291 Make Arranger filters look like our spec #325

Merged
merged 46 commits into from
Aug 1, 2018

Conversation

abgeorge7
Copy link
Contributor

@abgeorge7 abgeorge7 commented Jul 31, 2018

  • Modified the Arranger component to divide sections into tabs
  • If tab configuration is provided in parameters.js, then it will be divided into tabs. Otherwise it will just be normal Arranger aggregation filters that look more our style.
  • Overrode Arranger styles

@@ -0,0 +1,77 @@
import React from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same file as in my last PR, just moved to a new folder

Copy link
Contributor

@thanh-nguyen-dang thanh-nguyen-dang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get the fields name and title from the arranger backend? not hard code in the UI

@thanh-nguyen-dang thanh-nguyen-dang dismissed their stale review July 31, 2018 17:17

some change fixes it

@abgeorge7 abgeorge7 changed the title PXD-1291 PXD-1291 Make Arranger filters look like our spec Jul 31, 2018
Copy link
Contributor

@frickjack frickjack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few questions around dealing with default behavior when tab properties are not explicitly configured ...

<h4 className="data-explorer__filters-title">Filters</h4>
<AggregationTabs
filterConfig={this.props.arrangerConfig.filters}
{...this.props}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if arrangerConfig is not defined or just {}?

const tabs = [];
filterConfig.tabs.forEach((tab, i) => {
const tabAggs = aggs.filter(agg => tab.fields.includes(agg.field));
tabs.push(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be aggs.find instead of aggs.filter to avoid case where same field appears in more than one tab by accident?

}
/>,
);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens to a field that is configured in arranger, but not registered in a tab?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would get left out I think - I will write a test for that

Copy link
Contributor

@frickjack frickjack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 👍

@abgeorge7 abgeorge7 merged commit 05b14bd into master Aug 1, 2018
@abgeorge7 abgeorge7 deleted the feat/custom-filters branch August 1, 2018 19:01
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.

3 participants