Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task/WG-240: Tile Layers Panel #304

Merged
merged 31 commits into from
Jan 24, 2025
Merged

Conversation

rstijerina
Copy link
Contributor

@rstijerina rstijerina commented Jan 16, 2025

Overview:

  • Adds Panel component
  • Reworks base MapProject layout to use <Layout> from antd
  • Adds Tile Layers panel
    • Draggable, sortable items
    • Create Tile Layer modal added
  • Fixes issue with zindexes colliding when antd modal opened

PR Status:

  • Ready.

Related Jira tickets:

Testing Steps:

  1. Load a project
  2. Create layers of each type, rename them, delete them

UI Photos:

Screenshot 2025-01-22 at 5 21 27 PM
Screenshot 2025-01-22 at 5 21 18 PM
Screenshot 2025-01-22 at 5 21 13 PM
Screenshot 2025-01-17 at 3 38 52 PM

Notes:

TODO:

  • Reactive realtime map layer updates when adjusting tile layers

@rstijerina rstijerina marked this pull request as draft January 16, 2025 23:13
@rstijerina rstijerina force-pushed the task/WG-240--tile-layers-panel branch from c83faeb to ba9a503 Compare January 17, 2025 16:24
@rstijerina rstijerina marked this pull request as ready for review January 22, 2025 23:26
Copy link
Collaborator

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

left some comments, but i think they are all ones we can ignore or consider later. just take a look at them.

const isAuthenticated = useSelector((state: RootState) =>
isTokenValid(state.auth.authToken)
);
const canSaveForm = isAuthenticated && !isPublicView;
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to change but you could simplify to const canSaveForm = isAuthenticated. only authed users can see a private map (!isPublicView ); handled here: https://github.com/TACC-Cloud/hazmapper/blob/main/react/src/AppRouter.tsx#L60-L65

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it correct to say that authed users cannot see a public view?

Copy link
Collaborator

Choose a reason for hiding this comment

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

authed users or unauthed users can see a public view (project-public/{uuid}) while auth is required for the "private" route of project/{uuid}.

Ugh, i see i miswrote my comment. 🫤 i meant to write
const canSaveForm = !isPublicView;

react/src/pages/MapProject/MapProject.tsx Outdated Show resolved Hide resolved
react/src/components/LayersPanel/LayersPanel.tsx Outdated Show resolved Hide resolved
return (
<Layout {...props}>
<Flex vertical className={styles.root}>
<Header className={styles.header}>{panelTitle}</Header>
Copy link
Collaborator

Choose a reason for hiding this comment

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

in Feb, should we look at making the header take up smaller space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What size were you thinking?

Copy link
Collaborator

Choose a reason for hiding this comment

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

just slightly smaller text and then less empty space. but just my thoughts; looks good as is 👍

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

I'm seeing a bug where if you change the layers but don't click save, back out of the project map, and come back. It breaks the map.

I change the layers here, wanted them to reset to what they were, when to home page, and went back to the map. Now it won't load. After about 2 min, the map resets and the project loads again.

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the quick fix

@rstijerina rstijerina merged commit 7e289e6 into main Jan 24, 2025
5 checks passed
@rstijerina rstijerina deleted the task/WG-240--tile-layers-panel branch January 24, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants