react-ui-org / react-ui Goto Github PK
View Code? Open in Web Editor NEWReact UI is a themeable and performant UI library for React apps.
Home Page: https://react-ui.io
License: MIT License
React UI is a themeable and performant UI library for React apps.
Home Page: https://react-ui.io
License: MIT License
We don't want them in the main branch.
Currently, most components cannot have custom attributes like className
, aria-label
or similar. It might be useful if they could — for example, adding CSS utility classes for offsets would be easier. Optional attributes could be of any type, they would not be defined in component's props.
Current state:
<div className="mb-3">
<Button label="Button with classname" />
</div>
Proposal:
<Button className="mb-3" label="Button with classname" />
👉 Proposal: special utility props, see #18.
Proposal (currently supported only in ButtonGroup
and CardList
):
<ButtonGoup aria-label="group">
…
</ButtonGroup>
This issue is blocked by issue #53 (#58)
We need to create AutoScroll component that will be able to automatically scroll in selected direction when its content its updated. This functionality will be applied only if user will be scrolled at the edge of viewport. Component should detect change of content, it must not be detected by x or y coordinate because it will not work in case we will remove and add data at the same time.
We can create new AutoScroll component or implement it into ScrollView.
Check that commit messages are in the following format:
<Commit message text> (#<GitHub issue number>)
The component should:
Image source: https://stackoverflow.com/questions/50654217/adding-horizontal-scrolling-shadows-effect/50655240
Mac is fine, we need to improve UX on Windows.
Components that wraps native elements should forward refs, see https://reactjs.org/docs/forwarding-refs.html.
Following component should use this principe:
The only component that cannot use this princip is Radio, because it is rendered as list of radio inputs, so ref forwarding cannot be easily accomplished.
Now we generate only production lib.js
. We also need to generate development version of lib.js
(probably lib.development.js
) to be able to develop other applications with friendly named variables.
I can be done better: https://codepen.io/evank/pen/wWbRNO
Currently, the Button
component is used for sorting arrows. It would be nice to have them aligned with text in the table, in the same color and without the button-style hover effect.
Maybe also reveal them on hover like in MUI?
As of now, adding an outer spacing to a component is done with utility classes like this:
<div className="mb-3">
<Component />
</div>
This makes source code and DOM needlessly complex. It would be nice if we could do something like this:
<Component mb={3} />
This kind of “layout API” would be present in all UI components.
ℹ️ We don't want to make it possible to modify inner component styles so only outer CSS properties would be part in such API: margin
(all directions), maybe flex child properties (align-self
, justify-self
).
Toolbar
's options justify="space-between"
with nowrap
have the same effect.
Attribute loading
of Modal prop actions
needs to be changed to loadingIcon
to be in sync with previous changes of Button props.
transferProps
transfers staticContext
prop of components that uses ForwardRef. This effect is not wanted and must be fixed.
Related to #41.
Providing form fields with no automatic margins should lead to a better expected behaviour. By far, automatic margins don't work as good as Toolbar
or FormLayout
.
Resets of auto margins have to be removed from the afore-mentioned layout components.
In all form fields (CheckboxField
, MultipleSelectField
, RadioField
, SelectField
, TextArea
, TextField
, Toggle
):
helperText
to helpText
validationText
for invalid/valid/warning validation message (ie. don't share the purpose with helperText
)error
prop*Text
props as string or node to enable passing custom HTML such as links or iconsThe new validationText
would be styled according to the validationState
prop.
As discussed in #20:
Mainly, we have to unify differences between usage of error
vs helperText
+validationState
across all components, not only Radio, CheckBox and Toogle. It is weird to have different approaches of passing these values into components. So this is the first part of issue we probably agree on.
Then I am in to have two different props for setting these values, errorText
and helpText
, so we can set both independently. With this change, we will have to remove validationState
prop and remove old error
prop. And I also tend to use helpText
instead of helperText
.
The only thing I am not sure about is if we will need some help icon or not. If yes, then we will have to have prop for help icon, something like helpIcon
. But it is only weak point I see now. Maybe icon is not necessary. It is totally up to @adamkudrna.
I am still thinking about icons because it is not so handy to pass all these icons like sortingAscIcon, sortingDescIcon, helpIcon (if it is needed) to components all the time. And in case we will need to have helpIcon then I would like to open discussion aboutIconContext
component. We already have TranslationContext
that can pass translations to components globally and it can be same for icons.
Originally posted by @bedrich-schindler in #20 (comment)
have two different props for setting these values, errorText and helpText
I like these names
The only thing I am not sure about is if we will need some help icon or not.
Could we make helpText
and errorText
accept nodes and/or text and then we could pass in the icons inline? That would open other possibilities such as passing into helperText
a button that opens documentation modal and such things.
Something like (I didnt test this code):
<MyComponent
helpText={<><Icon type="help"> I'm the help text.</>}
/>
Originally posted by @mbohal in #20 (comment)
Modal
s should perform primary action and close on enter, just like they close on escape.
ToolbarSpacer
error
→ helperText
It would be handy to have multiple sizes of Modal to choose from: small
, medium
(default) and large
. Sizes should be configurable.
package.json
according to SemVer, merge into develop
via PRdevelop
into master
via PRpackage.json
in step 1master
(we want to keep develop
the default branch for PRs)npm publish
— can be automated with official GH actionsA CONTRIBUTING.md
file describing this workflow should be created (maybe in the .github
folder?).
Optionally:
Documentation components are not needed for library consumers, they should provide necessary tools themselves when building the documentation on their side. Therefore the components should be moved to src/demo/components
. They will be removed entirely once the demo is migrated to a new documentation platform (#15). This will also help us decrease the size of lib.js
.
Most buttons in app UIs are secondary actions. Primary variant is only used for primary actions which should be used far more sparingly (if not only once per screen).
We need the option to align form fields to the input field from the left side, even when they have auto-sized labels in horizontal layout. It must also work with vertical field layout (applied also for horizontal layout on small screens).
We need a way to color text with UI colors: success
, error
, … etc., and some gray shades – eg. disabled
or muted
. These classes don't need to be responsive.
Blocked by #53.
See https://codepen.io/evank/pen/wWbRNO. Blocked by #49.
We need a very specific layout for a centered CTA button and optional secondary actions on sides. This is required specifically for Load more button but it may be useful in other situations.
Current documentation is very basic. It consists of:
propTypes
comments.Individual issues are expected to be raised as discussion continues within this issue.
Currently, margin is added to the right side of field/button if there is more than one field in current context (div
). While this may work fine for wide screens, it breaks on small screens where vertical margin is missing. These automatic margins may also get work unexpectedly complicated eg. when there is a (invisible, absolutely positioned) modal or dropdown next to a button.
Since our existing Toolbar
layout perfectly covers this problem (and does a lot more), we could get rid of this functionality.
Automatic margins don't work in vertical layout:
Toolbar layout:
Currently the docs isn't accessible anywhere. Everyone should be able to view it when needed.
Serve the docs as a website to encourage designers use the UI library and to make it accessible to public.
(Taken from #15)
We want to stick to GitHub Pages unless something really serious makes us not to.
The question is, where shall we store the built website and how do we get it there?
There are two relevant types of GH Pages:
We can store the generated site in:
gh-pages
branch, see belowFor project pages, the site is required to reside in either of these:
gh-pages
branch (project pages)
master
branch, docs
directory (project pages)
For organisation pages or docs-dedicated project pages the site can live in the master
branch.
github.io
:
gh-pages
or master
branches): https://react-ui-org.github.io/react-ui
https://react-ui-org.github.io/react-ui-docs
https://react-ui-org.github.io
To test pull requests (and merges).
Looks like it could work — just add auto
option to size
with width: auto
.
They can be handy…
Due to Selenium testing, IDs among UI components need to be updated to be more Selenium-friendly.
ID of UI component is passed to native element without change (for input, textarea, ...). ID with prefix __label
need to be added to <label>
tag, because ID with this prefix is now typically at last leaf, which is typically <span>
that coitains label text.
Related to #86.
It would be handy to combine the definition of props to transfer with propTypes
. Currently it's white-listed aside like here in Button
:
const propsToTransfer = transferProps(
props,
['afterLabel', 'beforeLabel', 'block', 'clickHandler', 'disabled', 'endCorner', 'grouped', 'id',
'label', 'labelVisibility', 'loadingIcon', 'priority', 'size', 'startCorner', 'type', 'variant'],
);
Code could be also more DRY and easier to write and maintain then.
Added by @adamkudrna: This includes these useful ways of abstraction:
propTypes
assigned as value of a constant in the same filepropTypes
defined in another fileBased on issue: doczjs/docz#1431
We need to create documentation component that will allow us to render documentation table with all props and its description. This component should be similar to default docz PropType component, but need to be able to renders props that are composed from another proptype definitions.
I would recommend to move this component to separate repository later, because it seems that there are more people with same problem like we have.
This includes:
List
variants alignRight
→ alignEnd
and alignLeft
→ alignStart
text-left
→ text-start
, text-right
→ text-end
)It would be handy to have more compact Cards.
As we publish library on NPM registry, we do not need to have builds of library and demo in repository. We can gitignore them and publish only lib.js on NPM registry.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.