aulasoftwarelibre / cuestion-ui-kit Goto Github PK
View Code? Open in Web Editor NEWCuestion UI Kit
Home Page: http://aulasoftwarelibre.github.io/cuestion-ui-kit/
Cuestion UI Kit
Home Page: http://aulasoftwarelibre.github.io/cuestion-ui-kit/
QuestionList is a collection of QuestionItem. This component is similar to TalkList.
Improvements: order by creation date or votes (descent).
When an user enters on a talk, he can do two things:
So we need a QuestionItem and a QuestionList (many QuestionItem components).
This issue is only about QuestionItem.
This component will receive this props:
This component can use Card material-ui component. Storybook can represent two states: voted, not voted.
This component requires hooks in storybook to simulate when an user press like button. Because question state should be change outside the component
Translations (react-intl) are required to display the creation time.
TalkList can receive a "filter" prop. This filter is an array of strings with the topics we want to search among the talks.
So we need a component than displays all topics and let the user to select one or several topics.
Multiple Select can be the base widget or chips. Chips can be more elegant (see Behaviour section in material site).
This component will receive two props:
Storybook and tests are required.
Page:
/sessions/[code].tsx
Page description
This page show the current and next talks in a session and a filter topic selection.
Issue summary
Handle the change topics action. When the topic filter changes in the store, the talks with any of this topics will be raised.
Related: #24
Design
Types:
Actions:
Store/Reducer:
filter: Topic[]
Effects/saga:
Suggestions:
Page:
/talks/[id].tsx
Page description
Show a talk, a question input component and a question list componet.
Issue summary
Create the page and load the data from the API
Design
Types:
Actions:
FETCH_TALK_QUESTIONS_REQUEST -> talk id
FETCH_TALK_QUESTIONS_SUCCESS -> question list
FETCH_TALK_QUESTIONS_FAILURE -> error
FETCH_TALK_VOTED_QUESTIONS_REQUEST -> talk id
FETCH_TALK_VOTED_QUESTIONS_SUCCESS -> voted question list
FETCH_TALK_VOTED_QUESTIONS_FAILURE -> error
Store/Reducer:
questions: Question[]
votedQuestions: Question[]
Effects/saga:
FETCH_TALK_QUESTIONS_REQUEST -> SUCCESS or ERROR action
FETCH_TALK_QUESTIONS_SUCCESS -> update reducer -> FETCH_TALK_VOTED_QUESTIONS_REQUEST
FETCH_TALK_QUESTIONS_FAILURE -> error
FETCH_TALK_VOTED_QUESTIONS_REQUEST -> SUCCESS or ERROR action
FETCH_TALK_VOTED_QUESTIONS_SUCCESS -> update reducer
FETCH_TALK_VOTED_QUESTIONS_FAILURE -> error
Suggestions:
Change the components to compare the votedQuestion list with question list. This is the simplest way to check if current user voted or not for a question.
Our first MVP should:
This need two pages:
Every page in next.js does not share the state between them, so we can design every page as an independent application.
The main page could have this actions:
updated with @victormonserrat suggestions:
probably we need a SNACKBAR_MESSAGE_CLOSE with a timeout
so, our state could have this values:
Page:
/sessions/[code].tsx
Page description
This page show the current and next talks in a session and a filter topic selection.
Issue summary
Fetch the talks from the API and show the current and the nexts talks, using TalkList and TalkItem components.
Design
Types:
Actions:
Store/Reducer:
currentTalks: Talk[]
nextTalks: Talk[]
Effects/saga:
Suggestions:
No more next talks because conference was finished? Show a see you soon message or similar.
Finally we don't need a store for session in front page. So it can be removed.
But, we need one to ErrorMessage Snackbar. This components shows if we had a problem searching the session code.
The store has this interface:
error: boolean
errorMessage?: Error
This component is related with the next actions:
Sagas:
Page:
/talks/[id].tsx
Page description
Show a talk, a question input component and a question list component
Issue summary
Order the QuestionList by date or votes
Design
Types:
Actions:
Store/Reducer:
order: QuestionListOrder
Effects/saga:
Suggestions:
Page:
/talks/[id].tsx
Page description
Show a talk, a question input component and a question list component
Issue summary
Vote or unvote for a question
Design
Types:
Actions:
Store/Reducer:
None
Effects/saga:
Suggestions:
Add jest test to PR #5
cc @josefrnandezz @AdrianLopezGue
Page:
/talks/[id].tsx
Page description
Show a talk, a question input component and a question list component
Issue summary
Add a new question
Design
Types:
Actions:
Store/Reducer:
questions[]
Effects/saga:
Suggestions:
Page:
/sessions/[code].tsx
Page description
This page show the current and next talks in a session and a filter topic selection.
Issue summary
Get the talk clicked and change the route to: /talks/[id].tsx
Related: #24
Design
Types:
Actions:
Store/Reducer:
Effects/saga:
Suggestions:
Create an empty talk page
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.