From 6d8236d044f8d574923ce8228cefbb1659c25ad9 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Sat, 28 Mar 2026 18:11:48 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B0=8F=E7=94=B0=E6=80=A5=E3=83=86?= =?UTF-8?q?=E3=83=BC=E3=83=9E=E3=81=AE=E3=82=BF=E3=83=96=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=83=88=E8=A1=A8=E7=A4=BA=E3=81=A7=E9=80=9A=E9=81=8E=E9=A7=85?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=AB=E3=80=8C?= =?UTF-8?q?=E2=97=8B=E2=97=8B=E3=81=AE=E3=81=A4=E3=81=8E=E3=81=AF=E2=97=8B?= =?UTF-8?q?=E2=97=8B=E3=81=AB=E3=81=A8=E3=81=BE=E3=82=8A=E3=81=BE=E3=81=99?= =?UTF-8?q?=E3=80=8D=E3=83=90=E3=83=8A=E3=83=BC=E3=82=92=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/LineBoardEast.tsx | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/components/LineBoardEast.tsx b/src/components/LineBoardEast.tsx index 4b55d9e30..fdd94e0c0 100644 --- a/src/components/LineBoardEast.tsx +++ b/src/components/LineBoardEast.tsx @@ -8,6 +8,8 @@ import { useInterval, useTransferLinesFromStation, } from '~/hooks'; +import { useAfterNextStation } from '~/hooks/useAfterNextStation'; +import { useNextStation } from '~/hooks/useNextStation'; import { useScale } from '~/hooks/useScale'; import { isEnAtom } from '~/store/selectors/isEn'; import lineState from '../store/atoms/line'; @@ -17,6 +19,7 @@ import isTablet from '../utils/isTablet'; import { BarTerminalEast } from './BarTerminalEast'; import { BarTerminalOdakyu } from './BarTerminalOdakyu'; import { type ChevronColor, ChevronTY } from './ChevronTY'; +import { Heading } from './Heading'; import { EmptyStationNameCell, LineDot, @@ -45,6 +48,17 @@ const localStyles = StyleSheet.create({ alignItems: 'center', overflow: 'visible', }, + nextStopBanner: { + position: 'absolute', + bottom: 12, + left: '12.5%', + right: '12.5%', + }, + nextStopBannerText: { + color: '#212121', + fontWeight: 'bold', + textAlign: 'center', + }, }); const NumberingIconView: React.FC<{ station: Station }> = ({ station }) => { @@ -446,6 +460,8 @@ const LineBoardEast: React.FC = ({ ); const { selectedLine } = useAtomValue(lineState); const currentLine = useCurrentLine(); + const nextStation = useNextStation(); + const afterNextStation = useAfterNextStation(); const dim = useWindowDimensions(); @@ -454,6 +470,21 @@ const LineBoardEast: React.FC = ({ [currentLine, selectedLine] ); + const hasPassStation = useMemo( + () => stations.some((s) => getIsPass(s)), + [stations] + ); + + const showNextStopBanner = useMemo( + () => + isOdakyu && + isTablet && + hasPassStation && + !!nextStation?.name && + !!afterNextStation?.name, + [isOdakyu, hasPassStation, nextStation?.name, afterNextStation?.name] + ); + const intervalStep = useCallback( () => setChevronColor((prev) => @@ -523,6 +554,19 @@ const LineBoardEast: React.FC = ({ ]} > {stationsWithEmpty.map(stationNameCellForMap)} + {showNextStopBanner ? ( + + + {`${nextStation?.name}のつぎは${afterNextStation?.name}にとまります`} + + + ) : null} ); }; From c0680b93bec327073798ed7dc03da7461bdbcd94 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Sat, 28 Mar 2026 18:14:39 +0900 Subject: [PATCH 2/3] =?UTF-8?q?useNextStation=E3=81=A8useAfterNextStation?= =?UTF-8?q?=E3=81=AE=E3=83=A2=E3=83=83=E3=82=AF=E3=82=92=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/LineBoardEast.test.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/LineBoardEast.test.tsx b/src/components/LineBoardEast.test.tsx index 1552b1cb4..39e573f96 100644 --- a/src/components/LineBoardEast.test.tsx +++ b/src/components/LineBoardEast.test.tsx @@ -16,6 +16,14 @@ jest.mock('~/hooks', () => ({ useTransferLinesFromStation: jest.fn(() => []), })); +jest.mock('~/hooks/useAfterNextStation', () => ({ + useAfterNextStation: jest.fn(() => undefined), +})); + +jest.mock('~/hooks/useNextStation', () => ({ + useNextStation: jest.fn(() => undefined), +})); + jest.mock('~/hooks/useScale', () => ({ useScale: jest.fn(() => ({ widthScale: jest.fn((val) => val) })), })); From 4206cb73968710f893bc67599cc85f0348170b8b Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Sat, 28 Mar 2026 18:20:45 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E6=AC=A1=E5=81=9C=E8=BB=8A=E9=A7=85?= =?UTF-8?q?=E3=83=90=E3=83=8A=E3=83=BC=E3=81=AEbottom=E3=82=920=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/LineBoardEast.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LineBoardEast.tsx b/src/components/LineBoardEast.tsx index fdd94e0c0..1d7493838 100644 --- a/src/components/LineBoardEast.tsx +++ b/src/components/LineBoardEast.tsx @@ -50,7 +50,7 @@ const localStyles = StyleSheet.create({ }, nextStopBanner: { position: 'absolute', - bottom: 12, + bottom: 0, left: '12.5%', right: '12.5%', },