Add some generic tools to improve reusability#2260
Merged
offtherailz merged 2 commits intogeosolutions-it:masterfrom Oct 5, 2017
Merged
Add some generic tools to improve reusability#2260offtherailz merged 2 commits intogeosolutions-it:masterfrom
offtherailz merged 2 commits intogeosolutions-it:masterfrom
Conversation
- A generic component for toolbars (with buttons configurations, glyphs and tooltip management) - A tooltip enhancer. To avoid to add OverlayTrigger stuff every time. - A generic empty page component and enhancer (that allows to simply render a configurable empty page on some conditions - A Sidebar tool with good defaults, to reuse.
mbarto
reviewed
Oct 4, 2017
Contributor
mbarto
left a comment
There was a problem hiding this comment.
Looks good, just minor comments
| description, | ||
| content | ||
| } = {}) => | ||
| (<div style={{textAlign: "center", position: "absolute", width: "100%"}} > |
| * @param {string|node} [content] Additional content for the empty view (e.g. buttons...) | ||
| */ | ||
| module.exports = ({ | ||
| opacity= 0.45, |
Member
Author
There was a problem hiding this comment.
I will place it in css. Anyway I should keep the possibility to override the main div style (and then the stylesheet opacity) to allow quick fix of edge cases.
Contributor
There was a problem hiding this comment.
Having a style property (with empty defaults) is ok
|
|
||
|
|
||
| /** | ||
| * Empty State enhancer. Enhances an object adding a (localizable) tooltip. |
Contributor
There was a problem hiding this comment.
I think this documentation is copied from tooltip.jsx
Member
Author
There was a problem hiding this comment.
good catch. Going to fix it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request provides some useful enhancers to speed up coding and reuse code.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
What is the current behavior? (You can also link to an open issue here)
Nothing.
What is the new behavior?
Developers can use the new tools to implement a more coherent UI and reusing most of the code.
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other information:


Toolbar
code:
result:
Empty State


code:
result: