feat(ui): point help new-content indicator at the updated tabs and elements

- Replace timestamp comparison (help_last_viewed vs a hardcoded date) with
  a content-version marker (data-help-content-version) read from the
  rendered modal markup, so badge state always reflects the content
  actually served
- Only mark content as viewed when the modal is opened while it contains
  new content; opening a stale pre-upgrade page no longer suppresses the
  badge after a refresh
- Flag the Replay Tutorial button itself with a 'New' chip (hidden by
  default, one-time glow animation) and scroll it into view when
  revealed; tab-level dots now mark getting-started and shortcuts
  instead of documentation
- Translate help.newContentBadge into all 9 locales, reusing the
  established help.documentation.newBadge renderings
- Add HelpManager content-version unit tests (12 cases)
This commit is contained in:
Will Miao
2026-09-03 21:40:18 +08:00
parent a61840b366
commit 03569c62df
14 changed files with 273 additions and 65 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
<!-- Help Modal -->
<div id="helpModal" class="modal">
<div id="helpModal" class="modal" data-help-content-version="2026-09-03">
<div class="modal-content help-modal">
<button class="close" onclick="modalManager.closeModal('helpModal')">&times;</button>
<div class="help-header">
@@ -44,6 +44,7 @@
<button id="replayTutorialBtn" class="replay-tutorial-btn">
<i class="fas fa-graduation-cap"></i>
<span>{{ t('help.gettingStarted.replayTutorial') }}</span>
<span class="new-content-badge">{{ t('help.newContentBadge') }}</span>
</button>
</div>
</div>