Compare commits

..

2 Commits

Author SHA1 Message Date
Vaka.pro
a581ffaaff fix(frontend): hide calendar popups on empty dates
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
Keep race popovers limited to dates with events so empty days no longer show misleading hover details.

Made-with: Cursor
2026-04-13 22:58:36 +03:00
429a2924d7 Merge pull request 'fix(frontend): animate full race list row on hover (li, not inner link)' (#24) from fix/race-list-card-hover into main
Some checks failed
CI / build-and-test (push) Has been cancelled
Reviewed-on: #24
2026-04-13 19:51:07 +00:00
3 changed files with 7 additions and 7 deletions

View File

@@ -1,12 +1,12 @@
{ {
"name": "calendar-run-frontend", "name": "calendar-run-frontend",
"version": "0.4.2", "version": "0.4.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "calendar-run-frontend", "name": "calendar-run-frontend",
"version": "0.4.2", "version": "0.4.3",
"dependencies": { "dependencies": {
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",

View File

@@ -1,7 +1,7 @@
{ {
"name": "calendar-run-frontend", "name": "calendar-run-frontend",
"private": true, "private": true,
"version": "0.4.2", "version": "0.4.3",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -120,7 +120,7 @@ function CalendarMonthBlock(props: {
className={`races-cal__cell${hasRaces ? " races-cal__cell--has-race" : ""}${isOpen ? " races-cal__cell--open" : ""}`} className={`races-cal__cell${hasRaces ? " races-cal__cell--has-race" : ""}${isOpen ? " races-cal__cell--open" : ""}`}
onMouseEnter={() => { onMouseEnter={() => {
cancelClose(); cancelClose();
setOpenYmd(ymd); setOpenYmd(hasRaces ? ymd : null);
}} }}
onMouseLeave={scheduleClose} onMouseLeave={scheduleClose}
> >
@@ -132,7 +132,7 @@ function CalendarMonthBlock(props: {
}} }}
onFocus={() => { onFocus={() => {
cancelClose(); cancelClose();
setOpenYmd(ymd); setOpenYmd(hasRaces ? ymd : null);
}} }}
onBlur={(e) => { onBlur={(e) => {
const next = e.relatedTarget as Node | null; const next = e.relatedTarget as Node | null;
@@ -144,7 +144,7 @@ function CalendarMonthBlock(props: {
> >
{day} {day}
</button> </button>
{isOpen ? ( {isOpen && hasRaces ? (
<DayPopover <DayPopover
ymd={ymd} ymd={ymd}
races={dayRaces} races={dayRaces}
@@ -187,7 +187,7 @@ export function RacesCalendar(props: RacesCalendarProps): JSX.Element {
return ( return (
<div className="races-cal"> <div className="races-cal">
<p className="races-cal__hint">Наведите на дату краткая информация. Клик страница дня.</p> <p className="races-cal__hint">Наведите на дату с забегом краткая информация. Клик страница дня.</p>
{focusedMonthIndex === null || Number.isNaN(focusedMonthIndex) ? ( {focusedMonthIndex === null || Number.isNaN(focusedMonthIndex) ? (
<div className="races-cal__year"> <div className="races-cal__year">
{MONTH_NAMES_RU_SHORT.map((_, mi) => ( {MONTH_NAMES_RU_SHORT.map((_, mi) => (