Skip to content

Conversation

@mistercrunch
Copy link
Member

@ascott @vera-liu @bkyryliuk

Added a mockedActions in fixtures that uses the sinon lib, makes it easy to test if actions are triggered as they should.

To test outcomes after animations I decided to define timeout as a prop, which can be set to zero in the context of a test, using a short delay (using setTimeout) was still necessary.

@ascott
Copy link

ascott commented Oct 28, 2016

would be great to see screenshots/gif of this ui change!

<i className="fa fa-i-cursor" /> rename tab
</MenuItem>
<MenuItem eventKey="3">
{qe && <MenuItem eventKey="3">
Copy link

Choose a reason for hiding this comment

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

i think this is more readable when the condition and component are on separate lines:

{qe && 
  <MenuItem eventKey="3">
    <i className="fa fa-clipboard" /> <CopyQueryTabUrl queryEditor={qe} />
  </MenuItem>
}

tooltip="Data preview"
href="#"
/>
{table.selectStar && <CopyToClipboard
Copy link

Choose a reason for hiding this comment

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

move <CopyToClipboard to next line plz.

expect(React.isValidElement(<CopyQueryTabUrl />)).to.equal(true);
});
it('renders with props', () => {
it('be valid with props', () => {
Copy link

Choose a reason for hiding this comment

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

s/be/is

}

render() {
getHeader() {
Copy link

Choose a reason for hiding this comment

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

for any method that returns a node/element it's a nice pattern to name them with render, so this would be renderHeader,

Copy link

Choose a reason for hiding this comment

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

could this be pulled out into it's own component called <TableHeader />, nice to break things into smaller components, makes things more easily testable.

const cols = table.columns.slice();
return header;
}
getMetadata() {
Copy link

Choose a reason for hiding this comment

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

s/getMetadata/renderMetadata

</a>
</div>
<div className="pull-right">
<ButtonGroup className="ws-el-controls pull-right">
Copy link

Choose a reason for hiding this comment

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

would be nice to pull this out into a component called <TableControls />

@mistercrunch
Copy link
Member Author

@ascott I addressed all the comments except the ones calling to refactor out smaller components. I understand the value of doing that, but I'd rather keep it out of the scope of this PR.

@ascott
Copy link

ascott commented Oct 28, 2016

LGTM 🚢

@mistercrunch mistercrunch merged commit ab083b8 into apache:master Oct 29, 2016
@mistercrunch mistercrunch deleted the animations branch October 29, 2016 14:48
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.13.0 First shipped in 0.13.0 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.13.0 First shipped in 0.13.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants