Skip to content

Bring back isResultsFooterVisible that is props but never used#4548

Merged
joschect merged 5 commits intomicrosoft:masterfrom
jozhan:hide_suggestions_footer
Apr 13, 2018
Merged

Bring back isResultsFooterVisible that is props but never used#4548
joschect merged 5 commits intomicrosoft:masterfrom
jozhan:hide_suggestions_footer

Conversation

@jozhan
Copy link
Copy Markdown
Contributor

@jozhan jozhan commented Apr 13, 2018

Pull request checklist

  • Include a change request file using $ npm run change

Description of changes

Footer element has a default style which makes it difficult to hide (will still see border lines with no content) unless make css change on its ms- style. There is a prop isResultsFooterVisible but was never used and I am bringing it back.

Focus areas to test

(optional)

@jozhan jozhan requested a review from joschect as a code owner April 13, 2018 18:52
!moreSuggestionsAvailable && !isMostRecentlyUsedVisible && !isSearching ?
isResultsFooterVisible !== false && !moreSuggestionsAvailable && !isMostRecentlyUsedVisible && !isSearching ?
(<div className={ css('ms-Suggestions-title', styles.suggestionsTitle) }>
{ footerTitle && footerTitle(this.props) }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like this is already tied to the footer generation on line 128. I'd add isResultsFooterVisible to there and add footerTitle to the check down here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@joschect makes sense. Test needs to be updated since if nothing is specified, the footer div will not be rendered. And it shouldn't be anyways.

resultsMaximumNumber,
resultsFooterFull,
resultsFooter,
isResultsFooterVisible,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

move this to the bottom and set it to true. It will look like

let {
<other props>
suggestionsHeaderText,
isResultsFooterVisible = true
} = this.props;

onSuggestionRemove?: (ev?: React.MouseEvent<HTMLElement>, item?: IPersonaProps, index?: number) => void;
/**
* Indicates if the text in resultsFooter or resultsFooterFull should be shown at the end of the suggestion list.
* It defaults to true.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@default true

@joschect joschect merged commit 836bfff into microsoft:master Apr 13, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants