Skip to content

Allow drawing colour and fill to be customisable#379

Merged
jessicamcinchak merged 1 commit intomainfrom
add-drawing-color
Aug 30, 2023
Merged

Allow drawing colour and fill to be customisable#379
jessicamcinchak merged 1 commit intomainfrom
add-drawing-color

Conversation

@benbaumann95
Copy link
Copy Markdown
Collaborator

@benbaumann95 benbaumann95 commented Aug 29, 2023

Description of change

  • In Bops, we want to be able to draw a polygon on the map to visualise a consultation area where we return the addresses in that drawn area. However, this is currently hardcoded in red and to distinguish between the red line boundary and consultation area we preferably want this in a different colour that can be customisable. This PR adds this ability.
  • The drawingColor and drawingColorFill defaults to what we usually expect for the red line boundary

Trello ticket:
https://trello.com/c/IQsb3WNF/1908-improve-content-and-layout-for-querying-neighbour-addresses-by-polygon-search

Screenshot 2023-08-30 at 14 03 56

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 29, 2023

Deploy Preview for oslmap ready!

Name Link
🔨 Latest commit 132bfd2
🔍 Latest deploy log https://app.netlify.com/sites/oslmap/deploys/64ef3db165f7be0008c94614
😎 Deploy Preview https://deploy-preview-379--oslmap.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Thanks for these changes, a very useful feature! Two minor comments, but otherwise looks great 🖍️

name: "drawingFillColor",
type: "String",
values: "",
},
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.

Thanks for updating docs too ✨ I'd expect these new props to be added to docs/my-map-draw.doc.js rather than -features though please

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oh yeah woopsie

Comment thread src/components/my-map/drawing.ts Outdated
width: 3,
}),
}),
polygonVertices,
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.

nit: can polygonVertices also be refactored as a small function that takes the drawingColor argument ? They're still hardcoded to red!

Copy link
Copy Markdown
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Sorry two more minor tweaks that I just caught on final review!

Once adjusted, I'm happy to approve and merge this and make the release (limited permissions to that step because OSL NPM account) and share new version number with you for use 🎉 Thanks again for this!

Comment thread src/components/my-map/drawing.ts Outdated
Comment thread src/components/my-map/index.ts Outdated
@benbaumann95 benbaumann95 force-pushed the add-drawing-color branch 2 times, most recently from 9da0142 to c027c39 Compare August 30, 2023 12:55
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.

2 participants