Skip to content

feat: Improve style of autocomplete#128

Merged
DafyddLlyr merged 2 commits intomainfrom
dp/autocomplete-style-improvements
Mar 24, 2022
Merged

feat: Improve style of autocomplete#128
DafyddLlyr merged 2 commits intomainfrom
dp/autocomplete-style-improvements

Conversation

@DafyddLlyr
Copy link
Copy Markdown
Contributor

A few little fixes and improvements.

chrome-capture (12)

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 24, 2022

Deploy Preview for oslmap ready!

Name Link
🔨 Latest commit d6209e8
🔍 Latest deploy log https://app.netlify.com/sites/oslmap/deploys/623c8363eaa20e000866db24
😎 Deploy Preview https://deploy-preview-128--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 settings.

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.

visually subtle, but so much more usable - thanks!!

osPlacesApiKey = import.meta.env.VITE_APP_OS_PLACES_API_KEY || "";

@property({ type: String })
arrowStyle = "default";
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.

i've been defining typescript types in lieu of Lit offering an enum property type, that might make sense here too? usually just leads to clearer error messages if debugging, nicer vscode prefill suggestions, etc

here's an example from the map properties:

type DrawPointerEnum = "crosshair" | "dot";

@property({ type: String })
drawPointer: DrawPointerEnum = "crosshair";


getLightDropdownArrow() {
return '<svg class="autocomplete__dropdown-arrow-down" style="height: 17px;" viewBox="0 0 512 512" ><path d="M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9 c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3 z"/></svg>';
}
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.

👍 nice + simple

@DafyddLlyr DafyddLlyr merged commit 1e01760 into main Mar 24, 2022
@DafyddLlyr DafyddLlyr deleted the dp/autocomplete-style-improvements branch March 24, 2022 17:02
@DafyddLlyr DafyddLlyr mentioned this pull request Mar 24, 2022
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