-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Created TabbedList with subcomponents, missing API calls #46
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/code4ro/taskforce-fe-components/nwohqfubk |
…-components into feature/tabbed-list
Hi @acis |
</div> | ||
<div className="dropdown-menu" id="dropdown-menu" role="menu"> | ||
<div className="dropdown-content "> | ||
{members.length && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does .map()
need guard against empty lists ?
}; | ||
|
||
TabbedListItem.propTypes = { | ||
color: PropTypes.string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume that the colors will be a limited set of colors (as I've seen in other PRs). We might be better of if we make this a set of colors like ['primary', 'danger']
or ['blue', 'red']
and defined a hex color constant for each. @moonflare ?
Do we even want to make the API calls from the component itself ? |
@surdu my proposal was to have a component that is just a tabs + list, which would make the component much simpler and wouldn't require so many API calls. This way we could have one API call to get the people+test results and show a tab for each member. Wouldn't need to hardcode tabs and have different pages for them. |
<div className="vis-text">Vizualizeaza pentru:</div> | ||
<div className="action-container"> | ||
<div | ||
className={classNames("dropdown", { "is-active": dropdownActive })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use a select element for the dropdown? I think it would be easier to have all the functionality built in by default, like closing itself when clicking outside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a select
tag is better for accessibility too.
<div className={"tli-container"}> | ||
<div className={"tli-date"}>{format(date, "dd.MM.yyyy")}</div> | ||
<div className={"tli-text-wrapper"} onClick={onClick}> | ||
<div className={"tli-text"} onClick={onClick}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we trigger the onClick only when clicking on the blue/red button? I think it's unexpected that when I select text the alert pops up (also for some reason it pops up twice when i click on a list item)
Closes #31
Created TabbedList with fixed Tabs: Formularele mele and Membri Familiei
Dropdown to select family member and update list
All API calls are missing and results are mocked