AURORA-1944: таблицы форм — шаг прокрутки колесом мыши ×2 #247
Open
aep
wants to merge 3 commits from
feat/246-aurora-1944-wheel-scroll-step into test
pull from: feat/246-aurora-1944-wheel-scroll-step
merge into: RSHB:test
RSHB:main
RSHB:feat/266-aurora-1897-ahr-limit-period-vat-units
RSHB:feat/265-aurora-1909-ahr-manual-row-capture
RSHB:feat/264-aurora-1895-formula-localstorage
RSHB:feat/254-aurora-1906-spod-column
RSHB:feat/255-aurora-1938-transfer-econ-calc
RSHB:feat/250-aurora-1888-stages-role-filter
RSHB:feat/253-aurora-1905-form1-form4-export-layout
RSHB:feat/252-aurora-1902-form2-export-layout
RSHB:feat/251-aurora-1901-smeta-rf-column-order
RSHB:feat/249-aurora-1936-row-delete-confirm
RSHB:feat/248-aurora-1877-token-refresh
RSHB:feat/236-aurora-1843-svod2-server-paging-perf
RSHB:feat/236-aurora-1843-svod2-server-paging-web
RSHB:feat/236-aurora-1843-svod2-server-paging
RSHB:feat/214-aurora-1841-dict-vsp-virtual
RSHB:feat/220-aurora-1842-svod2-column-virtual
RSHB:feat/216-aurora-1846-form4-sheet-sum
RSHB:feat/235-aurora-1850-upd-form-cells-subtree
RSHB:feat/233-aurora-1848-sheet-json-no-pydantic-b
RSHB:feat/234-aurora-1839-cell-memo
RSHB:feat/233-aurora-1848-sheet-json-no-pydantic
RSHB:feat/237-aurora-1845-ws-connection-cache
RSHB:feat/215-aurora-1844-upd-form-cells-full-rows
RSHB:feat/226-aurora-1837-cell-styles-css
RSHB:feat/207-aurora-1831-project-tn-race
RSHB:feat/208-aurora-1832-phase-dates-tz
RSHB:feat/209-aurora-1833-greenlet-dev
RSHB:feat/206-aurora-1830-users-me-local-email
RSHB:feat/212-aurora-1838-ws-immutable-update
RSHB:feat/211-aurora-1836-row-measure
RSHB:feat/205-aurora-1922-pg15-migration-0012
RSHB:feat/213-aurora-1840-sheet-modals
RSHB:feat/210-aurora-1835-svod1-formatter
RSHB:test
RSHB:svod2-filter-fix2
RSHB:indent-export
RSHB:export-hierarchy
RSHB:svod2-filter-fix
RSHB:fix-id-column
RSHB:export-year-fix
RSHB:form3-source
RSHB:columns-svod-2
RSHB:export-optimize-refresh
RSHB:last-column
RSHB:svod-fix
RSHB:fix-columns
RSHB:form3-expense
RSHB:sattelite-fix
RSHB:delete-sattelite-rows
RSHB:form3-pages
RSHB:form1-sub_sub-fix
RSHB:sort-fix
RSHB:fixes-form
RSHB:new-expenses
RSHB:new-rows
RSHB:fix-style
RSHB:phase-template-edit
RSHB:fixes
RSHB:add-btn-reset-filter
RSHB:vsp-choice-fix
RSHB:project-filters-fix
RSHB:width-column-header-name
RSHB:task-filter-navigation
RSHB:auth
RSHB:icons-program-project
RSHB:export-optimize
RSHB:org-unit-limits
RSHB:auth-v2
RSHB:tasks-filters
RSHB:insert-row-fix
RSHB:svod-roles
RSHB:new-role-fix
RSHB:phase-edit-fix
RSHB:new-role
RSHB:delete-from-cell
RSHB:svod-cahe-and-table-direction
RSHB:direction-stage-fix
RSHB:backslash-fix
RSHB:svod
RSHB:front-svod-form-1
RSHB:projects-filters
RSHB:remove-row-fix
RSHB:computed-fix
RSHB:modal-add-year-project
RSHB:name-fix
RSHB:audit-logs-projects
RSHB:meta-form-3
RSHB:project-back-fix
RSHB:fix-sticky-columns
RSHB:fixies-3-form
RSHB:tech-num-fix
RSHB:fix-logic-limitation
RSHB:projects-fix
RSHB:3-form-project
RSHB:project-add-year-handler
RSHB:projects-summary-handler
RSHB:AURORA-1247
RSHB:projects-handlers
RSHB:vsp-choose-form2-2
RSHB:directions-fix
RSHB:add-validation
RSHB:add-checkbox-export-vsp
RSHB:fix-update-column-config
RSHB:fix-editable-columns
RSHB:add-biome-front
RSHB:vsp-choose-form2
RSHB:export-form-4
RSHB:booking-fix
RSHB:fix-front-tables
RSHB:phase-directions
RSHB:AURORA-1225
RSHB:fix-mapping-form-2-oper
RSHB:AURORA-1076-fix
RSHB:fix-add-row-program-4-form
RSHB:form2-limit-migrations
RSHB:delete-projects
RSHB:AURORA-1076
RSHB:form-4-add-row
RSHB:fix-logs
RSHB:AURORA-1206
RSHB:AURORA-894
RSHB:add-line-log-hotfix
RSHB:form-export-fix
RSHB:form-4-sql
RSHB:table-optimization-fix
RSHB:header_forms
RSHB:form-4-expense-item-filters
RSHB:entity-type-hotfix
RSHB:form-3-phases-timezones
RSHB:form-4-handlers
RSHB:export-fix
RSHB:close-date-vsp-fix
RSHB:deleted-user-auth-fix
RSHB:smeta-fix
RSHB:front-fixes
RSHB:line_id_code_full
RSHB:line_id_code
RSHB:timezones
RSHB:filenames-fix
RSHB:AURORA-1174-73
RSHB:project-sheets
RSHB:AURORA-1166
RSHB:websocket-projects
RSHB:project-front
RSHB:form3-permissions
RSHB:location_from_to_placement_type
RSHB:fix-vsp-filters
RSHB:fix-tests-and-functions
RSHB:mig2-fix
RSHB:vsp_fixes
RSHB:fix-ssp-title
RSHB:AURORA-1148
RSHB:fix-vsp-form-edit
RSHB:sql-funcs2-fix
RSHB:AURORA-1132
RSHB:logs
RSHB:AURORA-1147
RSHB:export-optimization
RSHB:AURORA-1131
RSHB:sql-funcs-fix
RSHB:vsp-dropdown-form
RSHB:form_2-back
RSHB:migrations
RSHB:websocket-self-flag
RSHB:reload-fix
RSHB:test-stand-fix
RSHB:excel-empty-fix
RSHB:requirements-fix
RSHB:AURORA-1096-back
RSHB:AURORA-1098
RSHB:AURORA-1096
RSHB:ws-user-id-fix
RSHB:expense-item-handler
RSHB:fix-date-phase
RSHB:excel-fix
RSHB:vsp-edit-field-fix
RSHB:vsp-fix-back
RSHB:vsp-back
RSHB:create-form-back
RSHB:export-direction-fix
RSHB:change-role-fix
RSHB:org-unit-users-fix
RSHB:audit-fix
RSHB:org-archive
RSHB:del_row_fix
RSHB:websocket_locks
RSHB:new_line_id
RSHB:admin-back
RSHB:form-fix
RSHB:ws
RSHB:ssp-fix
RSHB:stages-back
RSHB:form_124_write
RSHB:form_124
RSHB:new-model
RSHB:test-tsygankov
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "feat/246-aurora-1944-wheel-scroll-step"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #246
Jira: AURORA-1944 (эпик AURORA-1834)
Зачем
Жалоба заказчика: на формах за щелчок колеса уезжает мало строк. Браузер прокручивает 100 px за щелчок, вёрстка масштабируется от ширины окна (html font-size .83vw): на любом экране видно ~15 строк, за щелчок уезжает 2,1 (1920×1080) / 2,5 (1600×900) / 2,9 (1366×768) строки.
Что сделано
utils/wheelScroll.js:getWheelScrollDelta— шаг щелчка колеса мыши ×2 (WHEEL_SCROLL_MULTIPLIER = 2); null (событие отдаётся браузеру) для тачпада (|deltaY| < 50 px), Ctrl/Shift, горизонтали, deltaMode=2; Firefox (deltaMode=1) — строки × 33 px × 2.canScrollBy— у края таблицы событие отдаётся браузеру.hooks/useWheelScrollStep.js: wheel-listener{ passive: false }на области прокрутки таблицы; внутри textarea/select/input/listbox колесо работает как обычно.RealtimeTable.jsx:useWheelScrollStep(containerRef)послеuseHeaderPortal().Тесты
node --test src/components/RealtimeTable/utils/wheelScroll.test.js— 7/7 (тест написан первым).RealtimeTable.jsx— те же 2 ошибки / 5 предупреждений, что в test.npm run build— проходит.Проверить руками (Windows, обычная мышь)
Замер до/после
Не требуется: меняется длина шага, а не стоимость отрисовки. Шаги и доли экрана — в разделе «Тесты».
Rulings I made
Находки
columnLayoutUtils.test.jsв worktree без node_modules падает ERR_MODULE_NOT_FOUND (окружение, не код)🤖 Generated with Claude Code
H-1: «стало дёргаться» — исправлено (
dfccd20)Причина: R-2 (мгновенный
scrollTop += 200) убирал штатную плавную прокрутку Chrome/Edge на Windows — таблица прыгала скачком и сразу дорисовывала вдвое больше строк.Исправление: анимацию делает браузер —
scrollTo({ top, behavior: 'smooth' }); цель копится (getWheelScrollTarget,WHEEL_TARGET_RESET_MS = 300), чтобы при быстром вращении ход не терялся; при prefers-reduced-motion — без анимации.Проверка (стенд, dev-сборка, 1920×1080): один щелчок = 200 px за 4 кадра (1 → 137 → 55 → 7 px); 4 быстрых щелчка = 800 px; тачпад 5×10 px = 50 px (без изменений). Тесты 12/12, biome, build — ок.
R-2 заменён на: плавная прокрутка браузером с накоплением цели. Статус R-2 (мгновенный прыжок): rejected — дёргание (H-1).
Checkout
From your project repository, check out a new branch and test the changes.