Sprint 2: attempt cards, file import button, question layout, radio/check, sticky save

- Replace attempts table with attempts-card-list cards
- Custom import: sr-only file input + btn-styled label
- question-editor-block: stack header on mobile, row from 520px
- option marks: radio for single correct, checkbox for multiple
- Fixed bottom actions on max-width 640px with draft status; hide in-flow panel
- Update СПРИНТЫ_МОБИЛЬНЫЙ_ДИЗАЙН.md and DOC/ШАГИ/ШАГ_2026-04-27_003.md

Made-with: Cursor
This commit is contained in:
Константин Лебединский
2026-04-27 19:38:42 +05:00
parent 1db3653e66
commit 3e70f4322d
4 changed files with 268 additions and 77 deletions
+158
View File
@@ -900,3 +900,161 @@ code,
box-sizing: border-box;
}
}
/* --- Спринт 2: редактор вопроса, прогоны, импорт, фикс. футер --- */
.question-editor-block__header {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.question-editor-block__title {
margin-bottom: 0;
font-size: 0.95rem;
}
.question-editor-block__ai-btn {
width: 100%;
text-align: center;
box-sizing: border-box;
align-self: stretch;
}
@media (min-width: 520px) {
.question-editor-block__header {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
.question-editor-block__ai-btn {
width: auto;
align-self: center;
}
}
/* Спринт 2.4: radio = один верный, checkbox = несколько (нативная метафора) */
.question-option-row__mark {
width: 1.15rem;
height: 1.15rem;
flex-shrink: 0;
margin-top: 0.1rem;
cursor: pointer;
accent-color: var(--primary);
}
/* Список прогонов: карточки */
.attempts-card-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.attempts-card-list__item {
margin: 0;
}
.attempts-card-list__row {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
gap: 0.75rem;
}
.attempts-card-list__main {
flex: 1 1 12rem;
min-width: 0;
}
.attempts-card-list__action {
flex: 0 0 auto;
}
@media (max-width: 520px) {
.attempts-card-list__row {
flex-direction: column;
}
.attempts-card-list__action {
width: 100%;
text-align: center;
}
}
/* Импорт: скрытый input + кнопка-стиль */
.import-file-input {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.import-file-row {
position: relative;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
}
.import-file-label {
margin: 0;
cursor: pointer;
width: auto;
display: inline-block;
box-sizing: border-box;
}
/* Мобилка: закреплённый футер с «Сохранить» (дубль панели скрыт) */
.test-detail-fixed-actions {
display: none;
}
@media (max-width: 640px) {
.test-detail-page--with-fixed-actions {
padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
}
.test-detail-page--with-fixed-actions .editor-actions-flow {
display: none;
}
.test-detail-fixed-actions {
display: block;
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 30;
padding: 0.65rem 1.25rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
background: color-mix(in srgb, var(--surface) 96%, #fff);
border-top: 1px solid color-mix(in srgb, var(--outline-variant) 45%, transparent);
box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}
.test-detail-fixed-actions__inner {
max-width: var(--max-content);
margin: 0 auto;
}
.test-detail-fixed-actions__status {
margin: 0 0 0.45rem;
font-size: 0.8rem;
line-height: 1.3;
max-height: 3.2rem;
overflow: auto;
}
}