Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns the frontend with a “Web API ≥ 3.10” baseline by removing conditional feature-gates and always sending/allowing parameters that were previously only enabled for v3.10+.
Changes:
- Always append
precision=1when fetching people and families. - Always include/support gender value
3(“Other”) in new-person forms and the gender edit cycle. - Remove now-unneeded
apiVersionAtLeastimports and related branching logic.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/views/GrampsjsViewPerson.js | Always requests precision=1 for person fetch URL (removes API version check). |
| src/views/GrampsjsViewFamily.js | Always requests precision=1 for family fetch URL (removes API version check). |
| src/mixins/GrampsjsNewPersonMixin.js | Always exposes gender option Other (value 3) instead of gating by API version. |
| src/components/GrampsjsEditGender.js | Always cycles through gender 0→1→2→3→0 and removes backend capability check. |
Comments suppressed due to low confidence (1)
src/components/GrampsjsEditGender.js:58
- Now that the cycle always includes gender value
3, clicking will emit updates that backends < 3.10 may reject (this was previously version-gated). Because the current app-level minimum-version check only shows an error and doesn’t block usage, this can turn a “warning” into a hard failure. Either enforce the 3.10+ requirement globally, or keep a capability/version check in this component before cycling to 3.
_handleClick() {
const cycle = {0: 1, 1: 2, 2: 3, 3: 0}
fireEvent(this, 'edit:action', {
action: 'updateProp',
data: {gender: cycle[this.gender] ?? 0},
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/components/GrampsjsEditGender.js:56
- Gender cycling now always includes value
3(Other). If the frontend can still run against Web API versions that don’t support this enum value, clicking the button can emit an update that the backend rejects. Either reintroduce backend-version gating here, or make the minimum API version enforcement a hard stop before users can edit data.
_handleClick() {
const cycle = {0: 1, 1: 2, 2: 3, 3: 0}
fireEvent(this, 'edit:action', {
action: 'updateProp',
data: {gender: cycle[this.gender] ?? 0},
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.