Skip to content

front: add bbox fetching and viewport adjustment - #18052

Open
flomonster wants to merge 2 commits into
fam/add-bbox-infrafrom
fam/map-auto-focus
Open

front: add bbox fetching and viewport adjustment#18052
flomonster wants to merge 2 commits into
fam/add-bbox-infrafrom
fam/map-auto-focus

Conversation

@flomonster

Copy link
Copy Markdown
Member

Integrated for Editor, ItineraryModalMap, and Map components.

close https://github.com/osrd-project/osrd-confidential/issues/1286

@flomonster
flomonster requested a review from a team as a code owner August 7, 2026 16:47
@github-actions github-actions Bot added the area:front Work on Standard OSRD Interface modules label Aug 7, 2026
Integrated for Editor, ItineraryModalMap, and Map components.

Signed-off-by: Florian Amsallem <florian.amsallem@gmail.com>
@flomonster
flomonster requested a review from Signez August 7, 2026 16:57
@emersion
emersion self-requested a review August 7, 2026 17:38
Comment thread front/src/applications/editor/Editor.tsx Outdated

void getInfraByInfraIdBbox({ infraId: infraID })
.unwrap()
.then((infraBbox) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

async/await should be preferred over the callback-based Promise API.

}
}, [urlInfra]);

useEffect(() => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

useEffect() isn't a great thing to use here. useQuery() + useMemo() would be better. Redux usage makes things a bit painful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:front Work on Standard OSRD Interface modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants