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

Game preview #892

Merged
merged 8 commits into from Dec 21, 2020
Merged

Game preview #892

merged 8 commits into from Dec 21, 2020

Conversation

enmalafeev
Copy link
Collaborator

@enmalafeev enmalafeev commented Dec 20, 2020

github-icon closes #817
Добавить превью на страницу с игрой
Добавлен компонент GamePreview, как прелоадер.

import React from 'react';
import Gon from 'gon';
import LanguageIcon from '../LanguageIcon';
import '../../../../css/gamePreview.scss';
Copy link
Collaborator

Choose a reason for hiding this comment

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

У нас в проекте стили не импортируются в js. Все линки на стили в html прописаны. Поэтому импорт пропиши в style.scss.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

import '../../../../css/gamePreview.scss';

const GamePreview = () => {
const players = Gon.getAsset('players');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Мы вроде обсуждали, что компоненты на нижнем уровне ничего не должны знать про то, откуда берутся данные. Поэтому просто прокинь в пропсы информацию по игрокам.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Да, я сделал быстро по колхозному и забыл исправить. А на каком уровне тогда определять players из gon? Внутри rootContainer ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Да, можно и там.
Если совсем по честному, то можно на этапе конфигурации стора инициализировать данные для превью. Потому что в проекте уже давно принято все данные с сервера загонять в стор, а так же отдельные запросы на сервер прогонять через редаксовский стор.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

не fixed (( Как на уровень стора данные эти закинуть ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

падают тесты RootContainer

@codecov-io
Copy link

codecov-io commented Dec 20, 2020

Codecov Report

Merging #892 (b0eb3dc) into master (8b79d15) will increase coverage by 0.69%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #892      +/-   ##
==========================================
+ Coverage   76.42%   77.12%   +0.69%     
==========================================
  Files          91       91              
  Lines        1671     1674       +3     
==========================================
+ Hits         1277     1291      +14     
+ Misses        394      383      -11     
Impacted Files Coverage Δ
.../lib/codebattle_web/controllers/game_controller.ex 81.08% <75.00%> (-0.61%) ⬇️
services/app/lib/codebattle/bot/chat_client.ex 0.00% <0.00%> (-9.10%) ⬇️
services/app/lib/codebattle/bot/player_server.ex 66.66% <0.00%> (-1.52%) ⬇️
...es/app/lib/codebattle_web/channels/game_channel.ex 86.36% <0.00%> (+6.06%) ⬆️
...es/app/lib/codebattle_web/channels/chat_channel.ex 96.66% <0.00%> (+16.66%) ⬆️
services/app/lib/codebattle/chat/server.ex 89.28% <0.00%> (+21.42%) ⬆️

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 8b79d15...d6d7fe4. Read the comment docs.

@vtm9 vtm9 merged commit d3b8198 into master Dec 21, 2020
@vtm9 vtm9 deleted the GamePreview branch December 21, 2020 19:59
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