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

Add comment replies #282

Merged
merged 1 commit into from May 25, 2020
Merged

Add comment replies #282

merged 1 commit into from May 25, 2020

Conversation

InfluxOW
Copy link
Contributor

Добавил ответы на комментарии и слегка отрефакторил контроллер, вынеся валидацию в реквест.

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2020

Codecov Report

Merging #282 into master will decrease coverage by 0.08%.
The diff coverage is 86.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #282      +/-   ##
============================================
- Coverage     73.88%   73.80%   -0.09%     
- Complexity      113      119       +6     
============================================
  Files            44       45       +1     
  Lines           494      500       +6     
============================================
+ Hits            365      369       +4     
- Misses          129      131       +2     
Impacted Files Coverage Δ Complexity Δ
app/Comment.php 85.71% <66.66%> (-14.29%) 6.00 <3.00> (+3.00) ⬇️
app/Http/Controllers/CommentController.php 83.33% <100.00%> (-2.78%) 7.00 <3.00> (ø)
app/Http/Requests/CommentRequest.php 100.00% <100.00%> (ø) 2.00 <2.00> (?)
app/Policies/CommentPolicy.php 50.00% <100.00%> (+7.14%) 8.00 <1.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88a83ae...cb77243. Read the comment docs.

@fey fey requested a review from amshkv May 25, 2020 10:53
@fey
Copy link
Collaborator

fey commented May 25, 2020

Запилишь демку?

Comment on lines 13 to 15
@if ($comment->isReply())
<span class="small">- {{ __('comment.reply_to_comment') }} <a href="{{ getCommentLink($comment->parent) }}">#</a></span>
@endif
Copy link

Choose a reason for hiding this comment

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

кажется тут два раза small идет друг за другом, там вообще читаемый текст остался?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

кажется тут два раза small идет друг за другом, там вообще читаемый текст остался?
1

@@ -0,0 +1,24 @@
<div class="modal fade" id="reply-modal-{{ $comment->id }}" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
Copy link

Choose a reason for hiding this comment

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

в последней версии убрали role
twbs/bootstrap#30687

Copy link
Contributor Author

Choose a reason for hiding this comment

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

в последней версии убрали role
twbs/bootstrap#30687

тогда в edit модалке это тоже надо фиксить

Copy link

Choose a reason for hiding this comment

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

ну и тут получается тоже не то убрано

@InfluxOW
Copy link
Contributor Author

Запилишь демку?

https://influx-hexlet-sicp.herokuapp.com/

@fey
Copy link
Collaborator

fey commented May 25, 2020

По визуалу, предлагаю время комментария унести на край вправо,
И немного текст поправить, получится типа Username replied to Username2(lint to comment) 2 minutes ago
Тип такого, можно еще подглядеть у кого-нибудь, как выглядят комментарии годные

@fey
Copy link
Collaborator

fey commented May 25, 2020

Не забудь обновить демку, можно в хероку выбрать автодеплой твоей ветки, чтобы актуальные изменения были видны.

@InfluxOW
Copy link
Contributor Author

Я знаю, спасибо, она как раз обновляется сейчас.
С гитом пришлось помучиться больше, чем с написанием этих правок)

@InfluxOW
Copy link
Contributor Author

2
Вот так это всё дело сейчас выглядит, поприятнее стало, вроде бы

@fey
Copy link
Collaborator

fey commented May 25, 2020

Предлагаю убрать внешнюю рамку в комментарии или добавить фон, но надо посмотреть, чтобы не сливалось с формой ввода..

move comment validation to request
@InfluxOW
Copy link
Contributor Author

3
Убрал рамку и добавил отступ побольше, чтоб комментарии не сливались

@fey fey requested a review from amshkv May 25, 2020 14:06
@fey fey merged commit c8b05b1 into Hexlet:master May 25, 2020
@fey fey linked an issue May 25, 2020 that may be closed by this pull request
Comment on lines +10 to 11
<div class="modal fade" id="comment-modal-{{ $comment->id }}" tabindex="-1">
<div class="modal-dialog" role="document">
Copy link

Choose a reason for hiding this comment

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

я писал про role="document", а не dialog
не то удалили :)

@@ -0,0 +1,24 @@
<div class="modal fade" id="reply-modal-{{ $comment->id }}" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
Copy link

Choose a reason for hiding this comment

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

ну и тут получается тоже не то убрано

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.

Кнопка ответить в комментариях
4 participants