Skip to content

feat: homework2#189

Open
SINNERRRR wants to merge 2 commits into
FinUKMA:masterfrom
SINNERRRR:homework2
Open

feat: homework2#189
SINNERRRR wants to merge 2 commits into
FinUKMA:masterfrom
SINNERRRR:homework2

Conversation

@SINNERRRR
Copy link
Copy Markdown

HW2

Copilot AI review requested due to automatic review settings May 23, 2026 17:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR introduces a complete “Buy List” web app UI with persistent state, item controls (add/edit/delete/qty), and updated layout/styling.

Changes:

  • Added client-side shopping list logic with localStorage persistence and full DOM rendering.
  • Reworked HTML structure into a responsive two-panel layout with stats sections.
  • Replaced/expanded CSS to style the application, controls, tooltips, and a fixed author badge.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
smth.js Implements buy-list CRUD/qty/toggle/edit interactions and persists state to localStorage.
main.css Adds full app styling (layout, buttons, tooltips, print rules) replacing prior minimal styles.
index.html Updates markup to match the new app structure (input/add button, list container, stats, badge).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread smth.js
Comment on lines +3 to +8
let buyList = JSON.parse(localStorage.getItem('buyList')) || [
{ id: 1, name: 'Помідори', qty: 2, isBought: true },
{ id: 2, name: 'Печиво', qty: 2, isBought: false },
{ id: 3, name: 'Сир', qty: 1, isBought: false }
];

Comment thread smth.js
Comment on lines +103 to +104
saveState();
}
Comment thread smth.js
Comment on lines +124 to +126
inputField.addEventListener('keypress', (e) => {
if (e.key === 'Enter') addItem();
});
Comment thread smth.js
Comment on lines +173 to +175
input.addEventListener('keypress', (event) => {
if (event.key === 'Enter') input.blur();
});
Comment thread main.css
.item-controls { display: flex; justify-content: center; align-items: center; gap: 8px; }
.item-actions { display: flex; justify-content: flex-end; gap: 5px; }

button { cursor: pointer; outline: none; border: none; color: #fff; font-weight: bold; }
Comment thread main.css
background: #8b00ff; color: #fff; padding: 6px 10px; border-radius: 5px;
font-size: 12px; opacity: 0; visibility: hidden; transition: 0.2s; z-index: 10; font-weight: normal;
}
[data-tooltip]:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); }
Comment thread index.html
<div class="grid-container">

<main class="left-panel">
<div class="add-item-bar">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants