Conversation
This was
linked to
issues
Apr 23, 2025
Open
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the AppData model from individual optional fields for contact information to a unified array-based structure. The change consolidates all contact/social media fields (phone, email, web, social platforms, etc.) from separate O.Option<string> properties into a single info array containing tuples of type and value pairs.
- Replaces individual optional contact fields with a unified
info: Array<[type, value]>structure - Updates all consuming components and functions to work with the new array-based data model
- Introduces helper functions like
getAppDataInfoto extract specific contact information types
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Cards/src/model/app-data.ts |
Replaces individual contact fields with unified info array structure and adds helper function |
src/Cards/src/model/v-card-url.ts |
Updates vCard generation to work with new data structure using getAppDataInfo helper |
src/Cards/src/components/card.tsx |
Refactors component to process info array instead of individual contact fields |
src/Cards/src/components/card.stories.tsx |
Updates test data generation to use new array-based structure |
Comments suppressed due to low confidence (1)
src/Cards/src/model/v-card-url.ts:76
- The variable name 'a' is used twice in the same expression with different meanings - once for the AppData parameter and once for the avatar object. Consider renaming the inner variable to 'avatar' for clarity.
avatarBase64: pipe(a.avatar, O.map(a => a.url)),
| export const WithThreeMediaExpandVisible: Story = { | ||
| args: { | ||
| ...WithThreeMediaExpandNotVisible.args, | ||
| expanded: false, |
There was a problem hiding this comment.
The 'expanded' property is set to false, but this story is meant to show the expand functionality as visible. This should likely be true or removed to use the default.
Suggested change
| expanded: false, | |
| expanded: true, |
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.
Resolves #81 and #51