Dynamic icon use current date as default - #15693
Conversation
|
可能还是有人需要使用动态图标的,我建议实现这个:#15264 |
清除日期就是动态图标了,每次点击打开都同时显示静态和动态,我觉得没有必要 |
|
忘记有清除了,那应该还行 |
@TCOTC 通过改变参数就能改变图标的显示,本身也是一种“动态”,根据日期自动改变图标也只是“动态”的一种 |
|
要不在日期下面加一个描述? |
可以加一个“日期为空将动态获取当天日期” |
|
加好了一起合并吧 |
|
要不在“日期”后面加个 #iconInfo 图标,用 tooltip 如果是直接插一行文本在下面的话,多少有点丑了 |
|
@Vanessa219 这样可以吗
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates the dynamic icon feature to use the current date as the default instead of an empty date, addressing user issues where journal entries would lose their date icons when the date wasn't explicitly set.
- Changes default date behavior from empty string to current date using dayjs formatting
- Updates language keys from "dynamicEmoji" to "dynamicIcon" for consistency
- Adds informational UI element and tooltip explaining the empty date behavior
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/src/emoji/index.ts | Updates default date to current date and adds info icon with tooltip |
| app/appearance/langs/*.json | Updates language keys and adds new tooltip text across all supported languages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <span class="fn__flex-center ft__on-surface" style="width: 89px">${window.siyuan.languages.date}</span> | ||
| <span class="fn__space--small"></span> | ||
| <input type="date" max="9999-12-31" class="b3-text-field fn__flex-1" value="${dynamicCurrentObj.date}"/> | ||
| <span class="ariaLabel block__icon block__icon--show" aria-label="${window.siyuan.languages.dynamicIconDateEmptyInfo}"><svg><use xlink:href="#iconInfo"></use></svg></span> |
There was a problem hiding this comment.
The indentation of this line is inconsistent with the surrounding code. It should align with the other elements in the same container.
| <span class="ariaLabel block__icon block__icon--show" aria-label="${window.siyuan.languages.dynamicIconDateEmptyInfo}"><svg><use xlink:href="#iconInfo"></use></svg></span> | |
| <span class="ariaLabel block__icon block__icon--show" aria-label="${window.siyuan.languages.dynamicIconDateEmptyInfo}"><svg><use xlink:href="#iconInfo"></use></svg></span> |
This comment was marked as outdated.
This comment was marked as outdated.
* commit 'b699675b9726e23a5b7286fdae814016d4713616': (61 commits) 🔖 Release v3.3.1 🔖 Release v3.3.1 🎨 Clean code 🎨 siyuan-note#15736 📝 Update changelogs 📝 Move changelogs v3.2.x 🎨 siyuan-note#15610 🎨 Improve database template field grouping siyuan-note#15687 🎨 Improve database rollup template rendering siyuan-note#15722 🎨 反链面板移除元素后,文档分屏且为空会重复添加空块 🎨 Improve database rollup template rendering siyuan-note#15722 🎨 Improve av ⚡ siyuan-note#15734 🐛 siyuan-note#14269 🎨 Improve av 🎨 Block ref search and global search results display reference counts siyuan-note#15721 🎨 siyuan-note#15693 🚨 🚨 ✨ dynamic icon use current date as default (siyuan-note#15693) ...
* ✨ dynamic icon use current date as default * 💄add dynamicIconDateEmptyInfo
* ✨ dynamic icon use current date as default * 💄add dynamicIconDateEmptyInfo



#13770
问题:目前动态图标默认不填充日期,很多用户用来做日记图标时很容易没有设置日期,导致动态图标始终为今天日期,使得过去的日记的日期图标丢失
解决:动态图标默认填充当天日期