-
Notifications
You must be signed in to change notification settings - Fork 214
feat: add fixed position coordinate picker with map interface #909
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
base: main
Are you sure you want to change the base?
Conversation
|
@dzienisz is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
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.
Overall really glad to see this has been added to the code base, it has been needed for a while.
I will need to see some changes reverted otherwise it will cause all kinds of type issues around the code base. Additionally, the Fixed Position component must be added to the DynamicFormField and referenced using the type field by its string value (known as a factory function). Once you look at the DynamicFormField component you'll see the pattern. I'm available to help answer any questions on will be required to get this merged
packages/web/src/components/PageComponents/Settings/FixedPositionPicker.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/components/PageComponents/Settings/Position.tsx
Outdated
Show resolved
Hide resolved
|
I am open to all suggestions. This is my first big PR. I can improve it next week. |
d3777e6 to
9b80d5e
Compare
|
@dzienisz Wanted to follow up and see if the fixes were going to be added to this PR? |
today, sorry for delay |
9b80d5e to
72dff84
Compare
- Created new FixedPositionPicker component with clickable map for setting device coordinates - Added form field type for fixed position picker that appears when fixedPosition toggle is enabled - Implemented position request functionality to retrieve current device location
72dff84 to
c62c2d3
Compare
- Added dynamic altitude unit (Meters/Feet) that respects the user's imperial/metric display preference - Updated altitude field description to show the appropriate unit instead of hardcoded "Meters"
- Replace hardcoded IDs with useId() hook for proper accessibility - Use Number.isNaN() instead of isNaN() for more reliable type checking - Add radix parameter to parseInt() and remove unnecessary fragment wrapper
- Removed dedicated FixedPositionPicker form field type in favor of toggle's additionalContent prop - Moved FixedPositionPicker to render conditionally within toggle field instead of as separate dynamic field - Streamlined form field types by eliminating FixedPositionPickerFieldProps
|
Can you remove the large white border and the padding around this new component, and with the exception of one other comment about using standards such as {...rest} in the component it looks good to go. |
|
Also, how does this feature interact with the GPS Mode dropdown above? Can both be used at the same time? |
|
Also, since. you mentioned some "recommended notes" This can be enforced at the field level, look for |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…s for fixed position - Removed FixedPositionPicker component with map interface - Added latitude, longitude, and altitude fields directly to position form - Moved coordinate validation into PositionValidationSchema with proper min/max bounds - Updated translation strings to include coordinate ranges and improved altitude description - Coordinates now sent via setFixedPosition admin message on form submit when fixedPosition is enabled
8c102c8 to
b777c7b
Compare
b777c7b to
57612fa
Compare
…d unused field spreading - Removed additionalContent prop and its JSDoc documentation from ToggleFieldProps - Removed rendering of additionalContent below toggle switch - Cleaned up Controller render function by removing unused rest spread operator - Renamed field destructuring to controllerField for clarity
57612fa to
0d252aa
Compare
|
@danditomaso Setting position does not work, and I'm not sure why. |


Description
Remove Fixed Position Picker & Simplify Position Config
Summary
Replaced the old FixedPositionPicker UI (map, tooltips, per-component admin messages) with a simpler, form-based workflow directly inside Position.tsx. The form now owns latitude, longitude, and altitude fields, validating and saving coordinates through the existing config submission flow while still sending the
setFixedPositionadmin message when needed. Unused translations and the obsolete component were removed.Related Issues
Fixes: Users couldn’t reliably save fixed position coordinates after the picker button removal.
Changes Made
Removed
Updated Files
Position.tsx
setFixedPositionadmin message when fixed-position coordinates are present; coordinates are omitted from config payload.disabledByto hide coordinate fields unless “Fixed Position” is enabled.validation/config/position.tsPositionValidationSchemanow includes optionallatitude,longitude,altitude.config.json (en)Key Points
Testing
pnpm run lint(root) — passes.Checklist
PositionValidationSchemaupdated).