-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[v4] create collapsed option #222
Conversation
API.md
Outdated
@@ -28,6 +28,7 @@ A geocoder component using Mapbox Geocoding API | |||
properties. Search results closer to this point will be given | |||
higher priority. | |||
- `options.trackProximity` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, the geocoder proximity will automatically update based on the map view. (optional, default `true`) | |||
- `options.collapsed` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If true, the geocoder control will collapse unless until hovered or in focus. (optional, default `false`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"unless until", maybe just "until"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
* version4: (25 commits) fix focus trap (#220) add `npm run docs` step to template (#221) Fix typo in documentation additional properties existance check Ensure properties exist prior to checking id update changelog remove use of hardcoded feature IDs update outdated packages with npm update update changelog Bump insecure dev dependencies tests for options.flyTo Update changelog update jsdoc and api docs pass flyTo options to map upon selection extend eslint, add precommit hook (#210) replace sha.js with nanoid reduce bundle size to 42kb (13kb gzipped) [docs] update deploy process (#198) prepare to publish v3.1.6 update package-lock bump package version to v3.1.5 ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! This looks great. So smooth animating between collapsed and uncollapsed states. Great work!
Left one small comment about tests.
test/test.geocoder.js
Outdated
@@ -513,5 +513,54 @@ test('geocoder', function(tt) { | |||
t.end(); | |||
}); | |||
|
|||
tt.test('options.collapsed=true', function(t) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: these tests look good, but should we move them to test.ui.js
since they generally handle the testing of UI elements?
* version4: Update documentation with documentation@9.3.0 suggestions@v1.4.0 Update jsdoc strings add get/set functions expose render and getItemValue functions as constructor options
master
heading before mergingThis PR adds a
collapsed
option that will collapse the geocoder controller into a button. When hovered or focused, the controller will open up. It will collapse once the user focuses or hovers away from the controller, but only if they have cleared the search.refs #89 (comment)