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

Правда или действие #10

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

NargizaSalomova
Copy link
Contributor

@NargizaSalomova NargizaSalomova commented Mar 1, 2025

@keksobot keksobot changed the title feat: добавляет атрибуты form Правда или действие Mar 2, 2025
keksobot pushed a commit that referenced this pull request Mar 2, 2025
@keksobot
Copy link

keksobot commented Mar 2, 2025

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

@keksobot
Copy link

keksobot commented Mar 7, 2025

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

keksobot pushed a commit that referenced this pull request Mar 7, 2025
imageUploadCancle.addEventListener('click', closeUploadWindow);

const getHashtagsArray = (element) => {
const hashtagsArray = element.toLowerCase().split(/\s+/).filter((item) => item !== '');
Copy link
Collaborator

Choose a reason for hiding this comment

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

const hashtagsArray = element.toLowerCase().split(/\s+/).filter(Boolean);

Comment on lines 68 to 71
if(regexp.test(hashtag) === true) {
newArray.push(hashtag);
}
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

if(regexp.test(hashtag)) {

Comment on lines +4 to +5
const HASHTAGS_COUNT = 5;
const COMMENT_LENGTH = 140;
Copy link
Collaborator

Choose a reason for hiding this comment

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

должны быть сразу после import

const hashtagsName = getHashtagsArray(element);
const newArray = [];

hashtagsName.forEach((hashtag) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

uploadComment.removeEventListener('focus', onCancleKeyDown);
}

imageUploadInput.addEventListener('change', openUploadWindow);
Copy link
Collaborator

Choose a reason for hiding this comment

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

именование обработчиков


imageUploadInput.addEventListener('change', openUploadWindow);

imageUploadCancle.addEventListener('click', closeUploadWindow);
Copy link
Collaborator

Choose a reason for hiding this comment

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

именование обработчиков

Comment on lines 81 to 93
const getHashtagsDuplicate = (element) => {
const hashtagsArray = getHashtagsArray(element);
const newArray = [];
for (let i = 0; i < hashtagsArray.length; i++) {
if(!newArray.includes(hashtagsArray[i])){
newArray.push(hashtagsArray[i]);
}
}
if(newArray.length === hashtagsArray.length) {
return newArray;
}
};

Copy link
Collaborator

@Kartaviy-arteom Kartaviy-arteom Mar 8, 2025

Choose a reason for hiding this comment

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

new Set(hashtagsArray ).size === hashtagsArray .length
https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Set

Comment on lines 97 to 101
pristine.addValidator(uploadHashtag, getHashtagsName, 'введён невалидный хэштег');
pristine.addValidator(uploadHashtag, getHashtagsCount, 'превышено количество хэштегов');
pristine.addValidator(uploadHashtag, getHashtagsDuplicate, 'хэштеги повторяются');
pristine.addValidator(uploadComment, getCommentLength, 'длина комментария больше 140 символов');

Copy link
Collaborator

Choose a reason for hiding this comment

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

ошибки в константы
const ErrorMessage = { }

@keksobot
Copy link

keksobot commented Mar 9, 2025

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

keksobot pushed a commit that referenced this pull request Mar 9, 2025
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.

3 participants