Skip to content

feat: add import result badge and centralize status config#390

Open
MatiasArriola wants to merge 3 commits intodevelopmentfrom
feat/after-import-result-badge
Open

feat: add import result badge and centralize status config#390
MatiasArriola wants to merge 3 commits intodevelopmentfrom
feat/after-import-result-badge

Conversation

@MatiasArriola
Copy link
Copy Markdown

📌 References

📝 Implementation

  • new ImportResultBadge component displayed after import (allowing to reopen summary modal).
    • if visible, after choosing a new file it will be removed.
  • refactor: extract shared computeOverallSyncStatus to domain layer
  • refactor: getStatusConfig to avoid code duplication, and use colors from the theme instead of hardcoding them in each component. Now History, the new ImportResultBadge, and SyncSummary will use the same colors.
  • minor adjustament to spacing in ImportTemplatePage

🔥 Notes for the reviewer

📹 Screenshots/Screen capture

imagen

📑 Others

- new ImportResultBadge component displayed after import (allowing to reopen summary modal)
- refactor: extract shared computeOverallSyncStatus to domain layer
- refactor: getStatusConfig to avoid code duplication, and use colors from the theme instead of hardcoding them
- minor adjustaments to spacing in ImportTemplatePage
@ifoche
Copy link
Copy Markdown
Member

ifoche commented Mar 18, 2026

@bundlemon
Copy link
Copy Markdown

bundlemon bot commented Mar 18, 2026

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
1.72MB (+723B +0.04%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@MiquelAdell MiquelAdell requested a review from gqcorneby March 23, 2026 11:51
Copy link
Copy Markdown

@gqcorneby gqcorneby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[code-only review] Thanks, @MatiasArriola! Approving :) Just some nitpick but everything looks good!

Also, just double check and remove #fuzzy in the translation files 👍

case "NETWORK ERROR":
return { ...base, label: i18n.t("Network error") };
case "PENDING":
return { ...base, color: colors.grey, label: i18n.t("Import pending") };
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] looks like the color is already returned by getStatusConfig so overriding the color here is redundant

Comment thread src/webapp/utils/statusConfig.ts Outdated
OK: colors.positive,
};

export function getStatusColor(status: string): string {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] I think as SynchronizationStatus can be irrelevant if the status param is updated to SynchronizationStatus. Looks like the only caller is in SyncSummary.formatStatusTag which also accepts a string but can be updated to SynchronizationStatus as well

@MatiasArriola
Copy link
Copy Markdown
Author

Thanks @gqcorneby! good catches, implemented them. I didn't even know about fuzzy on i18n 😅

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.

4 participants