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

Редактор с проверкой упражнения #660

Merged
merged 2 commits into from Mar 15, 2021

Conversation

fey
Copy link
Collaborator

@fey fey commented Jan 31, 2021

Ограничения:
Можно загружать решение несколько раз со страницы (нет дизейбла после загрузки)
https://fey-sicp.herokuapp.com/exercises/3

@fey fey force-pushed the feat/solution-checker branch 3 times, most recently from 45eb24f to ee5ee5d Compare February 17, 2021 15:48
@codecov-io
Copy link

codecov-io commented Mar 12, 2021

Codecov Report

Merging #660 (fb9849a) into master (945abd8) will decrease coverage by 4.65%.
The diff coverage is 39.75%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #660      +/-   ##
============================================
- Coverage     83.59%   78.93%   -4.66%     
- Complexity      174      192      +18     
============================================
  Files            56       58       +2     
  Lines           707      788      +81     
============================================
+ Hits            591      622      +31     
- Misses          116      166      +50     
Impacted Files Coverage Δ Complexity Δ
app/Models/User.php 85.71% <0.00%> (-14.29%) 7.00 <1.00> (+1.00) ⬇️
app/Services/SolutionChecker.php 0.00% <0.00%> (ø) 3.00 <3.00> (?)
app/Http/Livewire/ExerciseEditor.php 24.24% <24.24%> (ø) 11.00 <11.00> (?)
app/Helpers/ExerciseHelper.php 97.43% <100.00%> (+3.31%) 8.00 <3.00> (+3.00)
app/Http/Controllers/SolutionController.php 100.00% <100.00%> (ø) 2.00 <0.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 945abd8...fb9849a. Read the comment docs.

@fey fey requested a review from amshkv March 12, 2021 12:20
@fey fey changed the title add solution check prototype Редактор с проверкой упражнения Mar 12, 2021
</a>
</li>
</ul>
<div class="tab-content card-body" id="pills-tabContent">
Copy link

Choose a reason for hiding this comment

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

странное ID
используется и kebab-case и camel-case
мб есть линтер на вьюхи чтобы такое ловить? (чтобы в одном стиле было)

Copy link
Collaborator Author

@fey fey Mar 13, 2021

Choose a reason for hiding this comment

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

линтера на вьюху нету, фиксанул айдишник

Comment on lines 26 to 48
{{ BsForm::open(null, ['wire:submit.prevent' => 'check']) }}
@if(\App\Helpers\ExerciseHelper::exerciseHasTests($exercise))
@switch($state)
@case(\App\Http\Livewire\ExerciseEditor::STATE_SUCCESS)
<div class="alert alert-success" role="alert">
{{ __('exercise.show.editor.message.success') }}
</div>
@break
@case(\App\Http\Livewire\ExerciseEditor::STATE_FAILED)
<div class="alert alert-warning" role="alert">
{{ __('exercise.show.editor.message.failed') }}
</div>
@break
@endswitch
@else
@if ($state === \App\Http\Livewire\ExerciseEditor::STATE_SUCCESS)
<div class="alert alert-success" role="alert">
{{ __('exercise.show.editor.message.success') }} ({{ __('exercise.show.editor.auth.required') }})
</div>
@else
<div class="alert alert-success" role="alert">
{{ __('exercise.show.editor.message.has_not_tests') }}
</div>
Copy link

Choose a reason for hiding this comment

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

меня вот этот набор алертов несколько смущает, это нельзя сделать как-то аккуратнее?
типа хелпера, который будет возвращать тип алерта и текст внутри? чтобы во вьюхе от такой сложной логики уйти?

@fey fey force-pushed the feat/solution-checker branch 3 times, most recently from 897cfbc to 05c77d1 Compare March 14, 2021 12:18
@fey fey force-pushed the feat/solution-checker branch 2 times, most recently from 124830a to feae5bb Compare March 15, 2021 16:34
@fey fey merged commit 8383729 into Hexlet:master Mar 15, 2021
@fey fey deleted the feat/solution-checker branch May 8, 2021 12:29
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.

None yet

3 participants