id
stringclasses 20
values | date
timestamp[s]date 2025-05-12 00:00:00
2025-05-12 00:00:00
| level
stringclasses 4
values | description
stringlengths 28
5.03k
| project
stringclasses 50
values |
---|---|---|---|---|
task-1 | 2025-05-12T00:00:00 | easy | add divs(class 'header', 'footer', 'main') with arbitrary text in '.root' element. '.root' occupies total viewport and children elements together occupy total '.root' space. header is always fixed at the top of '.root'; footer is always fixed at the bottom of '.root'; main occupies the remaining '.root' space. Use css flexbox only, NO css grid, float and position, NO js. | flex |
task-2 | 2025-05-12T00:00:00 | easy | add divs(class 'leftbar', 'content', 'rightbar') with arbitrary text in main(padding 0) to fill the whole space. leftbar(width 200px) is fixed at the left of main; rightbar(width 200px) is fixed at the right of main; content occupies the remaining main space. Use flexbox only. | flex |
task-3 | 2025-05-12T00:00:00 | easy | clear header content. add menu(class 'menu') with 3 items(arbitrary text) at the right side of header. Use flexbox only too. | flex |
task-4 | 2025-05-12T00:00:00 | easy | add logo(class 'logo') with arbitrary background color at the left side of header. Use flexbox only. | flex |
task-5 | 2025-05-12T00:00:00 | easy | leftbar should disappear when page width is equal to or less than 799px. | flex |
task-6 | 2025-05-12T00:00:00 | easy | when page width is equal to or less than 799px, menu items should have evenly spaced distribution in the whole header space and logo should disappear. | flex |
task-7 | 2025-05-12T00:00:00 | easy | when page width is equal to or less than 399px, main should occupy full page width and rightbar should be at the bottom of main. | flex |
task-8 | 2025-05-12T00:00:00 | easy | when page width is less than 400px, each menu item should occupy full page width. | flex |
task-9 | 2025-05-12T00:00:00 | challenging | separate leftbar space to 20 rows and 2 columns. NO remaining space or overflow. page height is still 100vh. MUST use flexbox align-content, align-self, MUST NOT use css calc function. | flex |
task-10 | 2025-05-12T00:00:00 | challenging | directly add 40 divs(class 'tag') in rightbar with 2 tags in each row; no other element between tags and rightbar; all tags fill whole rightbar width and height, NO remaining space and overflow. page height is still 100vh. Use flexbox only, no calc. | flex |
task-11 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, display the first 3 rows in rightbar. | flex |
task-12 | 2025-05-12T00:00:00 | challenging | show 12 cards (class 'card') in content with 3 per row, 100px minimum height each and vertical scrolling enabled. | flex |
task-13 | 2025-05-12T00:00:00 | challenging | when page width is less than 1000px, display 2 cards per row in content. | flex |
task-14 | 2025-05-12T00:00:00 | challenging | when page width is less than 600px, display 1 cards per row in content. | flex |
task-15 | 2025-05-12T00:00:00 | challenging | each card has a image(class 'card-image'), title and price; title's minimum height is 1.5rem and no wrap; price's minimum height is 1rem; image uses the remaining space. | flex |
task-16 | 2025-05-12T00:00:00 | challenging | only change one css property to reverse the order of all cards. | flex |
task-17 | 2025-05-12T00:00:00 | challenging | add a logo(class 'footer-logo') and info (class 'footer-info') in the footer. footer-info should never wrap and should show ellipsis when space is insufficient. | flex |
task-18 | 2025-05-12T00:00:00 | challenging | add left-drag and right-drag with absolute positions at the left and right sides of the content; left-drag and right-drag are not visible by default and become visible when mouse hovers over content. | flex |
task-19 | 2025-05-12T00:00:00 | challenging | gen js, drag right-drag and left-drag to adjust content width. | flex |
task-20 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, move right-drag to the bottom of content and drag right-drag to adjust content height. | flex |
task-1 | 2025-05-12T00:00:00 | easy | add divs(class 'header', 'footer', 'content') with arbitrary text in '.root' element. '.root' occupies total viewport and children elements together occupy total '.root' space. header (border-box) is always fixed at the top of '.root'; footer (border-box) is always fixed at the bottom of '.root'; content (border-box) occupies the remaining '.root' space. USE css float only, NO css flex, grid and position, NO js. | float |
task-2 | 2025-05-12T00:00:00 | easy | add divs(class 'leftbar', 'rightbar') with arbitrary text in '.root' element. leftbar (border-box) is fixed at the left of '.root'; rightbar (border-box) is fixed at the right of '.root'; content occupies the remaining '.root' space. USE css float only, NO css flex, grid and position, NO js. | float |
task-3 | 2025-05-12T00:00:00 | easy | clear header content. add menu(class 'menu') with 3 items(arbitrary text) at the right side of header. USE css float only, NO css flex, grid and position, NO js. | float |
task-4 | 2025-05-12T00:00:00 | easy | add logo(class 'logo') with arbitrary background color at the left side of header. USE css float only, NO css flex, grid and position, NO js. | float |
task-5 | 2025-05-12T00:00:00 | easy | leftbar width is the smaller of 200px and 20vw. rightbar width is the bigger of 200px and 20vw. leftbar should disappear when page width is equal to or less than 799px. | float |
task-6 | 2025-05-12T00:00:00 | easy | when page width is equal to or less than 399px, menu items should have evenly spaced distribution in the whole header space and logo should disappear. | float |
task-7 | 2025-05-12T00:00:00 | easy | when page width is less than 400px, content and rightbar should occupy full page width and rightbar should be at the bottom of content. | float |
task-8 | 2025-05-12T00:00:00 | easy | when page width is less than 400px, each menu item should occupy full page width. | float |
task-9 | 2025-05-12T00:00:00 | challenging | separate leftbar whole space into 20 rows and 2 columns. fill each cell with text 'this is a very long text sample to test word wrap'. USE float only. | float |
task-10 | 2025-05-12T00:00:00 | challenging | separate rightbar whole space into 10 rows and 2 columns; fill 40 items in the rightbar whole space. fill each item with text 'this-is-a-very-long-text-sample-to-test-overflow'. USE float only. | float |
task-11 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, display the first 3 rows in rightbar. | float |
task-12 | 2025-05-12T00:00:00 | challenging | show 12 cards (class 'card') in content with 3 per row, 100px minimum height each and vertical scrolling enabled. USE float only. | float |
task-13 | 2025-05-12T00:00:00 | challenging | when page width is less than 1000px, display 2 cards per row in content. | float |
task-14 | 2025-05-12T00:00:00 | challenging | when page width is less than 600px, display 1 card per row in content. | float |
task-15 | 2025-05-12T00:00:00 | challenging | each card has a image(class 'card-image'), title and price; title's minimum height is 1.5rem and no wrap, text is 'Long Product Title That Goes Here'; price's minimum height is 1rem; image uses the remaining space. USE float only. | float |
task-16 | 2025-05-12T00:00:00 | challenging | only change card css float property to reverse the order of the last 2 cards. | float |
task-17 | 2025-05-12T00:00:00 | challenging | add a logo(class 'footer-logo') and info (class 'footer-info') in the footer. footer-info should never wrap and should show ellipsis when space is insufficient. | float |
task-18 | 2025-05-12T00:00:00 | challenging | add left-drag and right-drag with absolute positions at the left and right sides of the content; left-drag and right-drag are not visible by default and become visible when mouse hovers over content. | float |
task-19 | 2025-05-12T00:00:00 | challenging | gen js, drag right-drag and left-drag to adjust content width. | float |
task-20 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, move right-drag to the bottom of content and drag right-drag to adjust content height. | float |
task-1 | 2025-05-12T00:00:00 | easy | JS class Question constructor params are: title (string), name (string), and has a member 'root'. 'Question.root' is a fieldset (class 'q', id equals to param name) contains a title legend (class 'q-title') and a body container (class 'q-body'). Save codes to es-module 'common/Question.js' imported by 'index.js'. Create a Question instance (title 'sample empty question') and prepend its root to the form, save codes to 'index.js'. | form |
task-2 | 2025-05-12T00:00:00 | easy | Class SingleSelectionQuestion (file 'common/SingleSelectionQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), options (string array). Use radio as selection control whose value is the options index. Create a SingleSelectionQuestion with random title, 'single1' name and 3 random options. Prepend it to the form. | form |
task-3 | 2025-05-12T00:00:00 | easy | Class MultiSelectionQuestion (file 'common/MultiSelectionQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), options (string array). Selection control value is the options index. Create a MultipleSelectionQuestion with random title, 'multi1' name and 3 random options. Prepend it to the form. | form |
task-4 | 2025-05-12T00:00:00 | easy | Class OpenQuestion (file 'common/OpenQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), isMultilines (boolean). Create an OpenQuestion with random title, 'open1' name, single line. Create another OpenQuestion with random title, 'open2' name, multilines. Prepend open1 and open2 to the form. | form |
task-5 | 2025-05-12T00:00:00 | moderate | Class RatingQuestion (file 'common/RatingQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), starCount (number, default 5). Highlight stars (class 'star') up to the clicked star (class 'active'), and get the rating value (stored in param-named control) from 0 to 1. Create a RatingQuestion with random title, 'rating1' name. Create another RatingQuestion with random title, 'rating2' name, 10 stars. Prepend rating1 and rating2 to the form. | form |
task-6 | 2025-05-12T00:00:00 | moderate | Class RankingQuestion (file 'common/RankingQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), options (string array). Insert after(or before) the target option (class 'ranking-item') when dragging the source option into the target option's bottom (or top) half. Store comma separated option indices in param-named control. Create a RankingQuestion with random title, 'ranking1' name and 3 random options. Prepend it to the form. | form |
task-7 | 2025-05-12T00:00:00 | moderate | Class NpsQuestion (file 'common/NpsQuestion.js') inherits from Question. Its constructor params are: title (string), name (string). Highlight the clicked score block element (class 'score'), and store score (0-10) in param-named control. Create a NpsQuestion with random title, 'nps1' name. Prepend it to the form. | form |
task-8 | 2025-05-12T00:00:00 | challenging | Class LikertQuestion (file 'common/LikertQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), options (string array), statements (string array). LikertQuestion is a table whose each row represents a statement (single selection), and each column is a radio option. Store each statement selection value in the control whose name is like {param-name}_{statement-index}. Create a LikertQuestion with random title, 'likert1' name, 5 random options, 3 statements. Prepend it to the form. | form |
task-9 | 2025-05-12T00:00:00 | moderate | Add questions contents(class 'contents') panel fixed at the right side of the page. Contents can not cover any question content. Each contents item (class 'contents-item') has the text from the associated question's title. Click each contents item to scroll page to the associated question. Update contents after each new question inserted to the form. Save codes to 'common/Contents.js'. | form |
task-10 | 2025-05-12T00:00:00 | challenging | Insert after(or before) the target contents item when dragging the source one into the target one's bottom (or top) half; Change the position of associated questions at the same time. | form |
task-11 | 2025-05-12T00:00:00 | challenging | Append a config panel (class 'q-config') to 'Question.root'. Config panel contains a checkbox (class 'q-required') associated with Question.required (boolean, default false). Form can not be submitted when any required question has no/empty value. Give priority to implement 'required' feature using each Question's form controls required attribute. Implement 'required' feature for SingleSelectionQuestion. | form |
task-12 | 2025-05-12T00:00:00 | challenging | Implement 'required' feature for NpsQuestion, LikertQuestion, RatingQuestion. | form |
task-13 | 2025-05-12T00:00:00 | challenging | Add property minLength (number, default 0) for OpenQuestion. A required OpenQuestion's answer length should be greater than 1. OpenQuestion's answer length should be greater than minLength. | form |
task-14 | 2025-05-12T00:00:00 | challenging | A required MultiSelectionQuestion should contain at least one checked option. If not valid, use alert dialog to display information and prevent form submitting. | form |
task-15 | 2025-05-12T00:00:00 | challenging | Class Survey (file 'common/Survey.js') constructor params are: formSelector (string), title (string). Method 'prependQuestion(question)' is used to prepend a 'question.root' to the form and to update contents. Method 'appendQuestion(question)' is used to append a 'question.root' to the form and to update contents. Replace relevant old codes to Survey. | form |
task-16 | 2025-05-12T00:00:00 | moderate | Add a numeric index (format `n.`) started from 1 for each question title. The topmost question index is 1. | form |
task-17 | 2025-05-12T00:00:00 | moderate | Class DataQuestion (file 'common/DataQuestion.js') inherits from Question. Its constructor params are: title (string), name (string), type (one of url/tel/email/date/number). Create 5 DataQuestion with random title, 'url/tel/email/date/number' type, name format `data-{type}` (e.g. `data-url`). Prepend 5 questions to the form. | form |
task-18 | 2025-05-12T00:00:00 | challenging | Add property isSelectMode (boolean, default false) for class SingleSelectionQuestion. Set isSelectMode to true to use 'select' control to replace radios. Add a checkbox (class 'q-select') associated with SingleSelectionQuestion.isSelectMode in the config panel. | form |
task-19 | 2025-05-12T00:00:00 | challenging | Add 'Shuffle' config and 'isShuffleMode' property for SingleSelectionQuestion, MultiSelectionQuestion, RankingQuestion. Check the checkbox (class 'q-shuffle') in the config panel to shuffle options, and uncheck it to restore the original orders. | form |
task-20 | 2025-05-12T00:00:00 | challenging | Click export button (class 'export') to save Survey exported data to 'localStorage.data'. Survey exported data format is like `{title:'survey title', questions:[{title:'single1 title', name:'single1', options:['option 1', 'option 2'], required:false, isShuffleMode:true, isSelectMode:true}, {title:'open1 title', name:'open1', isMultilines:true, required:false, isShuffleMode:false}]}`. Each type of question's JSON data should contain all properties from constructor params and configs. | form |
task-1 | 2025-05-12T00:00:00 | easy | add divs(class 'header', 'footer', 'content') with arbitrary text in '.root' element. '.root' occupies total viewport and children elements together occupy total '.root' space. header (border-box) is always fixed at the top of '.root'; footer (border-box) is always fixed at the bottom of '.root'; content (border-box) occupies the remaining '.root' space. USE css grid only, NO css flex, float and position, NO js. | grid |
task-2 | 2025-05-12T00:00:00 | easy | add divs(class 'leftbar', 'rightbar') with arbitrary text in '.root' element. leftbar (border-box) is fixed at the left of '.root'; rightbar (border-box) is fixed at the right of '.root'; content occupies the remaining '.root' space. Use grid only. | grid |
task-3 | 2025-05-12T00:00:00 | easy | clear header content. add menu(class 'menu') with 3 items(arbitrary text) at the right side of header. Use grid only too. | grid |
task-4 | 2025-05-12T00:00:00 | easy | add logo(class 'logo') with arbitrary background color at the left side of header. Use grid only. | grid |
task-5 | 2025-05-12T00:00:00 | easy | leftbar width is the smaller of 200px and 20vw. rightbar width is the bigger of 200px and 20vw. leftbar should disappear when page width is equal to or less than 799px. | grid |
task-6 | 2025-05-12T00:00:00 | easy | when page width is equal to or less than 399px, menu items should have evenly spaced distribution in the whole header space and logo should disappear. | grid |
task-7 | 2025-05-12T00:00:00 | easy | when page width is less than 400px, content and rightbar should occupy full page width and rightbar should be at the bottom of content. | grid |
task-8 | 2025-05-12T00:00:00 | easy | when page width is less than 400px, each menu item should occupy full page width. | grid |
task-9 | 2025-05-12T00:00:00 | challenging | separate leftbar whole space into 20 rows and 2 columns. fill each cell with text 'this is a very long text sample to test word wrap'. USE grid only. | grid |
task-10 | 2025-05-12T00:00:00 | challenging | separate rightbar whole space into 10 rows and 2 columns; fill 40 items in the rightbar whole space. fill each item with text 'this-is-a-very-long-text-sample-to-test-overflow'. USE grid only. | grid |
task-11 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, display the first 3 rows in rightbar. | grid |
task-12 | 2025-05-12T00:00:00 | challenging | show 12 cards (class 'card') in content with 3 per row, 100px minimum height each and vertical scrolling enabled. | grid |
task-13 | 2025-05-12T00:00:00 | challenging | when page width is less than 1000px, display 2 cards per row in content. | grid |
task-14 | 2025-05-12T00:00:00 | challenging | when page width is less than 600px, display 1 card per row in content. | grid |
task-15 | 2025-05-12T00:00:00 | challenging | each card has a image(class 'card-image'), title and price; title's minimum height is 1.5rem and no wrap, text is 'Long Product Title That Goes Here'; price's minimum height is 1rem; image uses the remaining space. USE grid only. | grid |
task-16 | 2025-05-12T00:00:00 | challenging | only change card css property to reverse the order of the last 2 cards. | grid |
task-17 | 2025-05-12T00:00:00 | challenging | add a logo(class 'footer-logo') and info (class 'footer-info') in the footer. footer-info should never wrap and should show ellipsis when space is insufficient. | grid |
task-18 | 2025-05-12T00:00:00 | challenging | add left-drag and right-drag with absolute positions at the left and right sides of the content; left-drag and right-drag are not visible by default and become visible when mouse hovers over content. | grid |
task-19 | 2025-05-12T00:00:00 | challenging | gen js, drag right-drag and left-drag to adjust content width. | grid |
task-20 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, move right-drag to the bottom of content and drag right-drag to adjust content height. | grid |
task-1 | 2025-05-12T00:00:00 | easy | 1) Create components/Header.tsx that displays 'Hello Blog' at the top of the page with appealing background color.
2) Create components/Main.tsx where content is aligned at the top left and fills the remaining space.
3) Develop components/Blog.tsx that accepts 'title' and 'detail' as props. Display mock blog data in Main.tsx using this Blog component with the mock data: { title: 'Morning', detail: 'Morning My Friends' }.
3) Render Header.tsx And Main.tsx in App.tsx
4) The classname of title in Blog.tsx is 'blog-title', the width of blog-title is 'fit-content', fontSize is 24px
| jotai |
task-2 | 2025-05-12T00:00:00 | easy | 1) Create a appealing BlogList component that accepts an array of blogs as props and displays the titles in div elements with the className 'list-item'.
2) Create atoms/blog.ts, use Jotai to create an atom with blog data, initialState is:
```
[{title: 'Morning', detail: 'Morning My Friends'}, {title: 'Travel', detail: 'I love traveling!'}]
```
2) In Main.tsx, render BlogList with the data from the atom (by using useAtom hook to access the blog data)
3) Position BlogList on the left side of Main.tsx with a width of 300px; each blog item should have a height of 40px and a border-box layout.
4) Only One Blog.tsx occupies the remaining space of Main.tsx. The content of Blog.tsx should be the first item of blog list.
| jotai |
task-3 | 2025-05-12T00:00:00 | easy | 1) Make blog items in BlogList selectable. When an item in BlogList is selected, highlight it with appealing style and display its content in the Blog Component.
2) Set 'Morning' as the default selected blog.
3) Beautify the List without changing the size of List Item
4) Use Jotai to manage the selected blog
| jotai |
task-4 | 2025-05-12T00:00:00 | easy | 1) Create a BlogForm component as a appealing Modal with the title 'Create Blog'.
2) Use Jotai to manage the 'formVisible' state with formVisibleAtom. When formVisible is true, the BlogForm should be displayed, otherwise, it should be hidden.
3) Add an 'Add Blog' appealing blue button in the right of Header.tsx to toggle the BlogForm's visibility.
4) Place a close button (.close-btn) with 'x' in the top right of BlogForm to hide it.
5) Place the BlogForm component in App.tsx.
| jotai |
task-5 | 2025-05-12T00:00:00 | easy | 1) An API is prepared, here is the docs of API:
GET /api/blogs
<response_definition>
interface Response {
blogs: { title: string; detail:string; }[];
}
</response_definition>
<response_example>
{
blogs: [
{ title: 'XXX', detail: 'XXX' },
],
}
</response_example>
2) In atoms/blog.ts, create an async atom to fetch data from API and update the blog list atom.
3) When App.tsx mounted, use the async atom to start fetching blogs.
4) When API is fetching, show 'Blog is loading' in App.tsx.
5) Notice: When Initial Blog is fetching, Header is always visible but 'Add Blog' button should be disabled.
| jotai |
task-6 | 2025-05-12T00:00:00 | moderate | 1) Add appealing Form with label (label[htmlFor="title"], label[htmlFor="detail"]) in BlogForm to input title and detail; BlogForm can be submitted by button (.submit-btn);
2) When submitted, append this Blog to BlogList, and set this Blog as selected.
3) Use Jotai to append form data to blogs
4) Check title duplication when submit clicked. When title is duplicated, stop submitting and show a red border around the input field.
5) Add a span(.blog-list-len) near 'Hello Blog' in Header.tsx to show the length of blogs by reading from the blogAtom
| jotai |
task-7 | 2025-05-12T00:00:00 | moderate | 1) Add 'Delete' appealing red button (.delete-btn) in top&right of Blog.tsx to delete the selected blog.
2) When blog deleted, set the first blog in blogs as selected.
3) If blogs is empty, shows 'No Blog' instead.
| jotai |
task-8 | 2025-05-12T00:00:00 | moderate | 1) Add 'Edit' appealing blue button (.edit-btn) in top&right of Blog.tsx.
2) When Edit clicked, toggle BlogForm to edit the content of selected Blog. The Title of BlogForm is 'Edit Blog' in this case. When submitted, update selected Blog.
3) Use Jotai to manage edit logic.
| jotai |
task-9 | 2025-05-12T00:00:00 | moderate | 1) Here is Search API:
GET /api/search_blogs?keywords=XXX
<response_definition>
interface Response {
// blogs is the search result
blogs: { title: string; detail:string; }[];
}
</response_definition>
<response_example>
{
blogs: [
{ title: 'XXX', detail: 'XXX' },
],
}
</response_example>
2) Add a Search.tsx(width: 200px, border-box) component above BlogList.tsx in Main.tsx.
3) Include an input field with the placeholder 'Search Blogs'. The keywords in the input field are used to FILTER blogs by using new Search API.
4) Use Jotai to request Search API and manage filtered blogs. Notice: Do not change the blogs in store.
5) Hint: When input field is typed fast, make sure the latest search result is displayed.
Constraint: DO NOT USE any third-party packages, ONLY React/Jotai APIs can be used to optimize performance.
| jotai |
task-10 | 2025-05-12T00:00:00 | moderate | 1) Add atoms/route.ts to control the Route Logic
The definition of state is:
```
const routeAtom = atom<string>(window.location.pathname);
```
2) In atoms/route.ts, create a function that listens to browser history change, and updates the routeAtom.
3) When path is '/', shows Main.tsx, when path is '/login', shows pages/Login.tsx. Header is visible for every page.
4) Render <h1>User Login</h1> in components/Login.tsx. Add Button with text '🔑' in the right of Header.tsx, when clicked, go to '/login'.
Constraint: DO NOT USE any third-party packages, ONLY React/Jotai APIs can be used to optimize performance.
| jotai |
task-11 | 2025-05-12T00:00:00 | challenging | 1) Add a button with the text '🔀' in Header to append 100,000 blogs to BlogList at one time. Each blog should have a title formatted in regex 'RandomBlog-[\\d]{12}', digits in title is random.
2) Ensure the page will not be stuck when 100000 blogs are appended by using proper Jotai patterns for large state updates.
Constraint: DO NOT USE any third-party packages, ONLY React/Jotai APIs can be used to optimize performance.
| jotai |
task-12 | 2025-05-12T00:00:00 | challenging | 1) Enable Markdown text input for blog details. Preview the Markdown in Blog.tsx.
2) Develop a utility atom to reuse Markdown-related logic.
3) Prevent XSS attacks.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
task-13 | 2025-05-12T00:00:00 | challenging | Implement user login, logout, and display blog poster's username.
1) Login API:
POST /api/login
Request: { username: string, password: string }
Response: { success: boolean }
2) On the /login page, add a LoginForm with labels(label[htmlFor="username"], label[htmlFor="password"]), and a .login-submit-btn to submit the form via the Login API.
3) Display the user's username in Header.tsx with the class '.username'.
4) Show the blog author's username with the class '.blog-author'. If blog has no author, display 'Anonymous'.
5) Add a '👋' Logout button (class '.logout-btn') next to the username in Header.tsx. Clicking it logs the user out.
6) Use Jotai to manage user states with userAtom and create a derived atom for handling login/logout actions.
| jotai |
task-14 | 2025-05-12T00:00:00 | challenging | Implement blog comment feature:
1) Display commenter's username with class '.comment-author' and text with '.comment-text'.
2) Add a CommentForm with a '.comment-input' textarea and a '.comment-submit-btn' below each blog.
3) Create commentsAtom to manage comments using Jotai.
4) Add undo functionality via Ctrl+Z (Windows/Linux) or Command+Z (Mac) to remove the last comment. Implement this with a commentHistoryAtom.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
task-15 | 2025-05-12T00:00:00 | challenging | Write a Gomoku chess game in route: '/game'
1) Add a button with the text '🎮' in Header, when clicked, jump to new page '/game'
2) chess board is 15*15, there is black chess and white chess, black chess first
3) Add the className for important element: white chess(.chess-white), black chess(.chess-black), position chess can be clicked to drop follow regex: .chess-pos-\\d{1,2}-d\\{1,2}.
4) show 'White's Turn' and 'Black'Turn' to shw current player
5) show 'White Wins!' and 'Black Wins!'.
6) Create gameStateAtom and related atoms to manage the game logic. Beautify this game.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
task-16 | 2025-05-12T00:00:00 | challenging | Enhance the Gomoku game with multi-step undo functionality.
1) Implement keyboard shortcut (Ctrl+Z on Windows/Linux or Command+Z on Mac) to trigger the undo action.
2) Allow multiple consecutive undos to revert the game state to any previous point by using a gameHistoryAtom.
3) Add a move history display with className '.move-history' showing all moves in the format "White: (x,y)" or "Black: (x,y)".
4) Each history item should have className '.history-item'.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
task-17 | 2025-05-12T00:00:00 | challenging | Implement a recording and replay system for Gomoku games.
1) Every games will be auto recorded, and can be replayed by play button (.replay-play-btn) after the game is finished.
2) Add play/pause button (className '.replay-play-btn', '.replay-pause-btn') and a slider (className '.replay-slider') to navigate through game moves.
3) When replaying, show the current move number with className '.current-move'.
4) There is an interval of 1000 ms between each move.
5) Create replayStateAtom and replayControlsAtom to manage replay functionality.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
task-18 | 2025-05-12T00:00:00 | challenging | Create functionality to share Gomoku games as blog posts.
1) Shows the "Share to Blog" button with className '.share-to-blog-btn' in the Gomoku game after the game is finished.
2) When clicked, open a modal form (className '.share-modal') with title input (className '.title-input'), description input (className '.description-input'), submit button (className '.share-submit').
Go to home page ('/') after submitted.
3) In Blog Detail, detect if a blog contains a Gomoku game recording and display a "Replay Game" button (className '.blog-replay-btn').
4) When the replay button is clicked, show a modal (className '.blog-replay-modal') with the full game replay interface.
5) The replay interface should include the start play button (className '.blog-replay-start-play'), showing the current move number with className '.current-move'. There is an interval of 1000 ms between each move.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
task-19 | 2025-05-12T00:00:00 | challenging | Add new page '/rooms':
1) Add a button with the text '🚪' in Header, when clicked, jump to new page '/rooms'
2) Add a "Create Room" button with className '.create-room-btn' that opens a room creation form.
3) The room creation form should include a labeled input field for room name ("Room Name") and a "Create" button to submit the form and create a new game room with a unique ID. Don't enter the room instantly.
4) Each room should be displayed as a card with className '.room-card' showing room name, creator's username, and current status.
5) Sync room status between all open tabs/windows.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
task-20 | 2025-05-12T00:00:00 | challenging | Implement a multi-user chat system based on rooms
1) When a user clicks on a chat room card (with className '.room-card'), navigate to '/chat/:roomId' route.
2) The chat room page ('/chat/:roomId') contains a message list (className '.message-list'), status display (in '.room-status'), and participant information (display all participants' usernames in '.participant-list').
3) Implement message sending and receiving functionality, including a message input box (className '.message-input') and a send button (className '.send-button').
4) Each message (className .message) should contains the sender's information (className '.message-sender').
5) If the user enters the chat room, add this user to .participant-list.
6) User will send heartbeat to check if user is in chat room, if the user is not active for 2000ms, the user will be removed from .participant-list.
7) Sync chat room status, messages, and user connection status between all open tabs/windows using Jotai.
Constraint: DO NOT use any third-party packages; ONLY React/Jotai APIs are permitted.
| jotai |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.