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

BOX-97: Implement CardEdit logic #43

Merged
merged 41 commits into from
Jul 25, 2021
Merged

Conversation

azinit
Copy link
Contributor

@azinit azinit commented Jul 14, 2021

Changelog

  • Добавил страницу редактирования + протянул в роутинг
  • Добавил логику редактирования карточки + сохранение и отмена изменений
  • Начал первые шаги к декомпозиции по фиче-слайсам v2
  • Нормализовал базово фикстуры, чтобы с ними уже можно было работать в редакторе
  • Базово обработал 404 случай (но отдельно тикет завел, т.к. нужно нормально решение и для других некоторых страниц)

Chore

  • Обновил Editor до последней версии (для text-overflow, css-vars и code-snippets)
  • Добавил immer (для "мутабельного" и декларативного описания "редьюсеров")
2fn6XZ3oQf.mp4

Checklist

Branch name

  • Your branch should be prefixed with feature/ or fix/ or chore/ or refactor/ or tests/
  • Add issue identifier
  • Add 3-5 words of description separated with -

PullRequest

  • This PullRequest implements new feature, fix bug, or some other changes
  • If PR is not ready to review mark it as Draft
  • All commits in this PR should be created by yarn commit by conventional-commits
  • Title of the PullRequest should have issue(s) identifier(s) ("BOX-123 Example title of PR")

@azinit azinit marked this pull request as draft July 14, 2021 23:49
@azinit azinit self-assigned this Jul 15, 2021
Copy link
Contributor Author

@azinit azinit left a comment

Choose a reason for hiding this comment

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

self-reviewed

@@ -1,7 +1,13 @@
import { getValueNode } from '@box/lib/editor';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Скорее всего потом вообще этот хелпер выпилим, но пока он нужен

src/api/mock/fixtures.ts Outdated Show resolved Hide resolved
src/entities/card/organisms/card-preview.tsx Outdated Show resolved Hide resolved
Comment on lines +181 to +188
const ItemEditorContainer = styled.div`
--editor-color: #62616d;
--editor-font-size: 15px;
--editor-line-height: 21px;
-webkit-line-clamp: 3;
display: -webkit-box;
-webkit-box-orient: vertical;
white-space: pre-line;
max-height: 90px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@risenforces Спасибо!)

src/features/card/actions/model.ts Outdated Show resolved Hide resolved
src/features/card/actions/ui/reset-changes.tsx Outdated Show resolved Hide resolved
Comment on lines +42 to +53
// Layout
const Header = styled.div`
margin-bottom: 50px;
`;

const Content = styled.div`
min-height: 500px;
`;

const Footer = styled.div`
margin-top: 100px;
`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Потенциально можно вынести в shared/ui/layout, но есть ощущение что это пока онли для этой страницы такие стили

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Возможно потом вынесу чисто ради "семантики" и базовых стилей

src/pages/card/edit/model.ts Outdated Show resolved Hide resolved
src/pages/card/index.ts Outdated Show resolved Hide resolved
src/pages/routes.ts Outdated Show resolved Hide resolved
@azinit azinit requested a review from dmi-ch July 15, 2021 03:11
@azinit
Copy link
Contributor Author

azinit commented Jul 15, 2021

@cardbox/core гляньте пож

@azinit azinit requested a review from risen228 July 15, 2021 07:46
src/features/card/actions/model.ts Outdated Show resolved Hide resolved
src/features/card/actions/model.ts Outdated Show resolved Hide resolved
src/features/card/actions/model.ts Outdated Show resolved Hide resolved
src/features/card/actions/model.ts Outdated Show resolved Hide resolved
src/features/card/actions/model.ts Outdated Show resolved Hide resolved
src/pages/card/edit/model.ts Outdated Show resolved Hide resolved
src/pages/card/index.ts Outdated Show resolved Hide resolved
src/features/card/actions/ui/update-changes.tsx Outdated Show resolved Hide resolved
src/pages/card/view/index.tsx Outdated Show resolved Hide resolved
src/pages/card/view/index.tsx Show resolved Hide resolved
@azinit
Copy link
Contributor Author

azinit commented Jul 16, 2021

Конфликты поправлю, появились после вливания другого PR

@azinit
Copy link
Contributor Author

azinit commented Jul 20, 2021

Такс.... Первый прогон по правкам занял 2+ часов... Остальное видимо завтра уже --___--

@azinit
Copy link
Contributor Author

azinit commented Jul 24, 2021

@cardbox/core гляньте пож

@azinit
Copy link
Contributor Author

azinit commented Jul 25, 2021

@sergeysova Расцепил пока submitChangesFx из draft, чтобы можно было переопределять поведение на уровне страниц без фабрик

Потом по задаче поправим по-нормальному

cc9ab9f

src/features/card/draft/model.ts Show resolved Hide resolved
src/features/card/draft/model.ts Show resolved Hide resolved
@sergeysova sergeysova merged commit d9c5b76 into master Jul 25, 2021
@sergeysova sergeysova deleted the feat/BOX-98-impl-edit-card branch July 25, 2021 09:30
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.

5 participants