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

Feature/autopolygon leasehold icon #234

Merged
merged 6 commits into from
May 5, 2023
Merged

Conversation

Hazz223
Copy link
Contributor

@Hazz223 Hazz223 commented May 5, 2023

I've added two new icons; one for LeaseholdAutoPolygonIcon, one for FreeholdAutoPolygonIcon. This leaves the current AutoPolygonIcon icon alone.

It should be noted that LeaseholdAutoPolygonIcon is the same as AutoPolygonIcon - this will allow us to migrate away from AutoPolygonIcon while maintaining backwards compatibility.

Copy link
Contributor

@iza-pik iza-pik left a comment

Choose a reason for hiding this comment

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

These should also be added to Icons.stories.tsx.

Comment on lines +131 to +136
const LeaseholdAutoPolygonIcon: React.FC<Props> = ({ size = 'large', fill = DEFAULT_ICON_COLOR, ...props }) => (
<IconWrapper size={size}>
<LeaseholdAutoPolygon fill={fill} {...props} />
</IconWrapper>
);
export { LeaseholdAutoPolygonIcon, autoPolygonUrl as leaseholdAutoPolygonUrl };
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can just rename AutoPolygonIcon rather than create a duplicate with a different name.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You'll need to add it to the stories file too so it shows up in Stroybook, which I'm happy to help with if you need it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd prefer not to change the name, as it would introduce a breaking change to the code base. This slow API migration means we can remove the old AutoPolygonIcon component once we're happy.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So that icon isn't used anywhere else (only in maps), but that's fine if we want to approach it like that, can you add a note to remove the duplicate though as we tend to forget about these things.

Copy link
Contributor

Choose a reason for hiding this comment

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

The app code can be changed to use the new name when updating the wombat version in Maps, so it shouldn’t be too risky in any case

@github-actions github-actions bot added the 🚀 Approved 🚀 PR approved and ready to merge label May 5, 2023
@Hazz223 Hazz223 merged commit 2f6565a into main May 5, 2023
@ChrissyABrown
Copy link
Contributor

This svg is 25 24 which is a little odd as mostly they are 24 24 which keeps them a square
It's probably not a massive deal but it could throw off styling a bit as it's not the same size as the others

@Hazz223 Hazz223 deleted the feature/autopolygon-leasehold-icon branch May 5, 2023 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Approved 🚀 PR approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants