Skip to content

Яковлев Илья M3339#18

Open
okayvlev wants to merge 2 commits intoitmo2019:masterfrom
okayvlev:master
Open

Яковлев Илья M3339#18
okayvlev wants to merge 2 commits intoitmo2019:masterfrom
okayvlev:master

Conversation

@okayvlev
Copy link
Copy Markdown

No description provided.

@okayvlev
Copy link
Copy Markdown
Author

Новое сообщение добавляется нажатием 'n', старые сообщения удаляются на 'd'.

@underoot underoot self-assigned this Mar 25, 2019
Comment thread js/app.js Outdated
}

var currentMessage = messages[index];
currentMessage.setAttribute("state", "deleted");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Кастомные аттрибуты у узлов лучше сторить в неймспейсе data-*

Comment thread js/app.js Outdated

var currentMessage = messages[index];
currentMessage.setAttribute("state", "deleted");
var parent = currentMessage.parentNode;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Для чего данная переменная?

Comment thread css/animations.css Outdated
border-width: 0px;
}

@keyframes appearance {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Можно анимацию для добавления письма организовать через transition

Comment thread js/app.js Outdated

function newMessage() {
var currentMessage = document.getElementsByClassName("mailbox__mail")[0];
if (currentMessage.getAttribute("state") != "hidden") {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Хорошо бы проработать кейс добавления не одного письма а нескольких

Comment thread js/app.js
@@ -0,0 +1,36 @@
document.onkeypress = function(event) {
if (event.key == 'n') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Кроме клавиатурных сокращений попробуй организовать удаление писем по выделенным при нажатии на кнопку-ссылку Удалить

Comment thread js/app.js Outdated
return;
}
currentMessage.setAttribute("state", "showing");
setTimeout(function() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Можно повесить обработчик на событие окончания анимации animationend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants