Conversation
jpettitt
commented
Mar 23, 2026
Owner
- adds a card to display contacts
- add support for sections view sizing
- add translations support and machine translations: Dutch, French, German
Run `git tag v1.x.x && git push --tags` to publish a release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ith rAF retry Same fix applied to card.ts — observe `this` (host element the grid sizes) instead of ha-card, and retry via rAF loop until clientHeight is non-zero so clipped rows are hidden on first render without waiting for a resize event. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Start ha-card with visibility:hidden when grid_options.rows is set. After the first successful trim pass, clear visibility so the card appears already clipped — no visible flicker of overflowing rows. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace ResizeObserver with a simpler approach: on every render that has grid_options.rows set, immediately hide the host element (this.style.visibility), then rAF-retry until this.clientHeight is non-zero, run trim showing/hiding rows as needed, then reveal. No observers, no flicker. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
display:none removes rows from layout causing reflow and flicker. visibility:hidden keeps layout stable — overflow:hidden on ha-card clips fully-out-of-bounds rows, and the partial boundary row is invisibly hidden without any geometry change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…fter 10 frames - Compare offsetTop+offsetHeight against card.clientHeight (elements are positioned relative to card, not the host element) - Fall back to this.clientHeight if card has no height yet - After 10 retries with h=0, reveal unconditionally to prevent permanently hidden cards in non-grid contexts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Set opacity:0 on the host so the browser lays out the card and computes clientHeight immediately. After one rAF the height is available, trim runs to hide overflowing rows with visibility:hidden, then opacity is cleared. No retry loop or fallback needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- src/translations/en.json — all UI strings keyed by path (card.*, time.*, editor.*) - src/localize.ts — makeLocalize(lang) returns a LocalizeFunc; falls back to 'en' - helpers.ts — formatLastSeen now accepts a LocalizeFunc for time strings - card.ts, contact-card.ts, editor.ts — all hardcoded strings replaced with t() calls - tsconfig.json — resolveJsonModule: true for JSON imports - rollup.config.mjs — @rollup/plugin-json added to bundle translations - package.json — @rollup/plugin-json dev dependency added To add a new language: create src/translations/<lang>.json and add it to the languages map in src/localize.ts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- scripts/translate.mjs — reads en.json, translates missing keys via Claude
API (or DeepL with TRANSLATE_BACKEND=deepl), writes fr/nl/de JSON files.
Incremental: only fills missing keys, preserving manual corrections.
Protects {placeholder} and <html> tokens with sentinels before API call.
- scripts/check-translations.mjs — CI lint: exits 1 if any target file is
missing keys from en.json (no API key required).
- src/localize.ts — imports fr/nl/de; languages map extended.
- src/translations/fr.json, nl.json, de.json — empty placeholders (fall back
to English until translated). Run: ANTHROPIC_API_KEY=sk-... npm run translate
- package.json — translate, translate:dry, check-translations npm scripts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on note Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.