Skip to content

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

Merged
Ramon-Jimenez merged 4 commits into
developmentfrom
feat/after-import-result-badge
Jun 9, 2026
Merged

feat: add import result badge and centralize status config#390
Ramon-Jimenez merged 4 commits into
developmentfrom
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

ifoche commented Mar 18, 2026

Copy link
Copy Markdown
Member

@bundlemon

bundlemon Bot commented Mar 18, 2026

Copy link
Copy Markdown

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
1.72MB (+725B +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

@gqcorneby gqcorneby left a comment

Copy link
Copy Markdown

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 😅

@Ramon-Jimenez Ramon-Jimenez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All good, thanks @MatiasArriola !

@Ramon-Jimenez Ramon-Jimenez merged commit 695c6b8 into development Jun 9, 2026
3 checks passed
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.

5 participants