Skip to content

Add Hide future dates - #54

Open
xieweicong wants to merge 2 commits into
Quorafind:masterfrom
xieweicong:origin/hide-future-dates
Open

Add Hide future dates#54
xieweicong wants to merge 2 commits into
Quorafind:masterfrom
xieweicong:origin/hide-future-dates

Conversation

@xieweicong

Copy link
Copy Markdown

Add option to hide future daily notes

Description

Added a setting to hide future daily notes, inspired by Logseq's behavior. In Logseq, future journal entries are automatically hidden until their date arrives, which helps users focus on current and past content. This PR brings the same functionality to the Daily Notes Editor plugin.

Changes

  • Added hideUnreachedDates setting option
  • Added toggle in settings tab
  • Added date filtering based on current date
  • Future daily notes will be hidden when the setting is enabled

Implementation

Simple date comparison using moment.js to filter out future dates when the setting is enabled. The view automatically updates when the setting changes.
截屏2025-02-08 下午4 19 50
截屏2025-02-08 下午4 19 20
截屏2025-02-08 下午4 20 06


Note: This code was generated with the assistance of AI (Claude). As I'm not very familiar with TypeScript, I would appreciate thorough code review to ensure quality and security. Any suggestions for improvements are welcome.

@costela costela 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.

Sorry for the drive-by review by a non-project-member. Hopefully some more feedback will help this PR move along a bit 🤞

Comment thread src/dailyNoteViewIndex.ts
Comment on lines +16 to +19
declare global {
var app: App;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what are these being used for? 🤔

Comment thread src/leafView.ts
Comment on lines +27 to +29
declare global {
var app: App;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same as above: I can't quite see the need for these?

chadrach pushed a commit to chadrach/Obsidian-Daily-Notes-Editor-fork that referenced this pull request Jul 9, 2026
- Format note headers as "dddd, MMMM Do YYYY" instead of raw filename
- Add conditional backlinks (only show when file has actual backlinks)
- Add spacing before backlinks section (margin-top: 2em)
- Fix mobile text fade effect on embedded editors (PR Quorafind#83)
- Integrate hide future dates setting (PR Quorafind#54)
- Integrate auto-focus today's note + switch to existing editor (PR Quorafind#77)
- Fix iOS scrolling by never unloading rendered editors
- Add scroll event listener fallback for iOS infinite scroll reliability
- Add settings: hideUnreachedDates, autoFocus, switchToExisting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants