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-1312 feat(search): Enable search function for data dictionary view #434

Merged
merged 33 commits into from
Jan 30, 2019

Conversation

qingyashu
Copy link
Contributor

@qingyashu qingyashu commented Dec 6, 2018

Deployed in https://qingya.planx-pla.net/DD, try it

New Features

  • Search function for data dictionary

Breaking Changes

Bug Fixes

Improvements

Dependency updates

Deployment changes

@qingyashu qingyashu added the WIP Work in progress label Dec 6, 2018
@qingyashu qingyashu removed the WIP Work in progress label Dec 18, 2018
@qingyashu qingyashu requested a review from abgeorge7 December 18, 2018 15:52
@qingyashu qingyashu requested review from ZakirG and mfshao December 18, 2018 16:11
@qingyashu
Copy link
Contributor Author

Dictionary search function deployed in https://qingya.planx-pla.net/DD, please have a try and let me know which part (interactions or UI) you think could improve... thanks! 🙏

@ZakirG
Copy link
Contributor

ZakirG commented Dec 18, 2018

Wow, looks so cool. This page is so much more useful than what was there a month or two ago!!!

Feedbacks:

  • I think that the highlight on matched nodes could be more dramatic, versus the property matches. For example, when I search "Case", it seems like the matched node just gets a text color change -- can you enlarge the matched node, or highlight its border?

  • One Web Content Accessibility Guideline is that color alone should not be used to convey meaning. If possible, we should follow this. But I guess that's design feedback :P

  • The "Expand all Results" button results in some messy UI when there are more than a few nodes with matched properties. Not sure how to fix!

  • In the search results bullet points, the numbers before "matched Nodes" and "matches in Properties" are blue, which makes them appear clickable, but they aren't -- would "badges" be more appropriate? (like the class .dicionary-search-history__item-count )

  • The search feature is present on the table view page, but doesn't seem to perform any highlighting functionality there. This feels confusing.

border-top: 1px solid var(--g3-color__silver);
}

.dicionary-search-history__item {
Copy link
Contributor

Choose a reason for hiding this comment

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

typo! "dicionary" -> "dictionary"

background-color: var(--g3-color__gray);
}

.dicionary-search-history__item:hover .dicionary-search-history__item-count {
Copy link
Contributor

Choose a reason for hiding this comment

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

more typos! "dicionary" -> "dictionary"

@qingyashu qingyashu added the WIP Work in progress label Dec 19, 2018
@qingyashu qingyashu removed the WIP Work in progress label Dec 20, 2018
@qingyashu qingyashu changed the title WIP feat(search): import search library, and link to autocomplete PXD-1312 feat(search): Enable search function for data dictionary view Dec 20, 2018
@qingyashu
Copy link
Contributor Author

  • fix bugs:

    • only highlighted one in property types
    • a node text highlighting bug (due to Fuse library's bug)
    • when selecting a node, and then search, data model structure is not reset
  • UI changes:

    • make the matched result table full-screen table
    • when highlighting second node, make first level related node half faded, and with dashed stroke style
    • make the matched node name more emphasized, add half opacity for other matched nodes, and with dashed stroke style
  • small style changes:

    • Change highlighted node text to black color
    • Add border to legend
    • change wording in "xx matches in node properties"
    • when start searching, jump to graph view
  • and many other code refactoring

@PlanXCyborg
Copy link

Jenkins Build 20 : time taken 24 min

Copy link
Member

@MichaelLukowski MichaelLukowski left a comment

Choose a reason for hiding this comment

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

took a while, but everything looks great and works well. LGTM

@PlanXCyborg
Copy link

Jenkins Build 21 : time taken 1 hr 15 min

Copy link
Contributor

@abgeorge7 abgeorge7 left a comment

Choose a reason for hiding this comment

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

Had some small things

const svgBoundingBox = this.props.highlightingNodeSVGElement
&& this.props.highlightingNodeSVGElement.getBoundingClientRect
? this.props.highlightingNodeSVGElement.getBoundingClientRect()
const highlightingNodeSVGElement = 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.

this.props.graphNodesSVGElements defaults to null, will this line cause problems if it's null and it tries to access a field?

};

handleSeeOnlyMatchedProperties = () => {
this.props.onCloseMatchedNode();
Copy link
Contributor

Choose a reason for hiding this comment

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

this names are still kind of confusing to me, if this function is called handleSeeOnlyMatchedProperties I don't expect it to call another function onCloseMatchedNode, which sounds like it closes a panel that displays matches?

const { result, errorMsg } = searchKeyword(this.searchData, str);
if (!result || result.length === 0) {
this.props.setIsSearching(false);
this.props.onSearchResultUpdated([], []);
Copy link
Contributor

Choose a reason for hiding this comment

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

why pass two empty arrays in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because search result is empty here.

this.setState({
isSearchFinished: true,
hasError: true,
errorMsg,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think errorMsg was defined in the original state

@qingyashu
Copy link
Contributor Author

Thanks for comments!~ code updated and please have a check again

@PlanXCyborg
Copy link

Jenkins Build 22 : time taken 24 min

@PlanXCyborg
Copy link

Jenkins Build 23 : time taken 42 min

@PlanXCyborg
Copy link

Jenkins Build 24 : time taken 36 min

@PlanXCyborg
Copy link

Jenkins Build 25 : time taken 1 hr 0 min

@PlanXCyborg
Copy link

Jenkins Build 26 : time taken 35 min

@PlanXCyborg
Copy link

Jenkins Build 27 : time taken 31 min

Copy link
Contributor

@abgeorge7 abgeorge7 left a comment

Choose a reason for hiding this comment

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

🎉

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.

5 participants