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

Created TabbedList with subcomponents, missing API calls #46

Closed
wants to merge 2 commits into from

Conversation

acis
Copy link
Member

@acis acis commented Mar 18, 2020

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

@vercel
Copy link

vercel bot commented Mar 18, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/code4ro/taskforce-fe-components/nwohqfubk
✅ Preview: https://taskforce-fe-components-git-fork-acis-feature-tabbed-list.code4ro.now.sh

@vercel vercel bot temporarily deployed to Preview March 18, 2020 14:07 Inactive
@RaduCStefanescu
Copy link
Contributor

Hi @acis
Thank you for the PR!
Sorry for the confusion, but it seems we need to change the UX for this component.
Can we update the issue when we have the latest UX?

@moonflare moonflare added the WIP Work In Progress label Mar 18, 2020
package.json Show resolved Hide resolved
</div>
<div className="dropdown-menu" id="dropdown-menu" role="menu">
<div className="dropdown-content ">
{members.length &&
Copy link
Member

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,
Copy link
Member

@surdu surdu Mar 19, 2020

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 ?

@surdu
Copy link
Member

surdu commented Mar 19, 2020

Do we even want to make the API calls from the component itself ?

@acis
Copy link
Member Author

acis commented Mar 19, 2020

@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 })}
Copy link
Member

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

Copy link
Contributor

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}>
Copy link
Member

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)

@acis acis closed this Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabbed list
6 participants