Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New extension: Last Year Today #969

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

qcrao
Copy link
Contributor

@qcrao qcrao commented Jan 2, 2025

No description provided.

Copy link

github-actions bot commented Jan 2, 2025

Here’s your link to the diff:

Added qcrao/last-year-today dcaaea7 (PR-shorthand: qcrao+last-year-today+969)

@qcrao
Copy link
Contributor Author

qcrao commented Jan 2, 2025

@baibhavbista

Thank you for the review! I’ve closed the original MR and opened a new one. In the updated MR, I’ve removed the logic that automatically opens the history page on load. Now, the history page will only open at the specified time. Let me know if you have any further feedback!

Copy link
Contributor

@baibhavbista baibhavbista left a comment

Choose a reason for hiding this comment

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

Hey @qcrao sorry, it looks like I forgot to do a detailed review the last time around.

I found some issues:

1. the setting for time does not seem to work (probably because you're using diff names for reading and writing, maybe a refactor gone wrong? - "daily-update-hour" vs "hour-to-open-last-year-today-page")
image

2. there are a lot of unused dependencies, could you clean those up? (probably from init code for the extension itself)
image

  1. your solution to the problem of historical pages seems to be to only show that at the exact time. As you probably know yourself, issue with this is that if the user opens the graph at 9:01 am, they won't see the historical pages.
    Might I suggest a different solution? When you open the historical pages, you do something like extensionAPI.settings.set("last-opened-day", "01-07-2025");. And when you load the extension, you first check this setting. If value is same as today, do nothing, otherwise open the historical pages

Copy link

Here’s your link to the diff:

Added qcrao/last-year-today ac48497 (PR-shorthand: qcrao+last-year-today+969)

1 similar comment
Copy link

Here’s your link to the diff:

Added qcrao/last-year-today ac48497 (PR-shorthand: qcrao+last-year-today+969)

@qcrao
Copy link
Contributor Author

qcrao commented Jan 10, 2025

Hey @qcrao sorry, it looks like I forgot to do a detailed review the last time around.

I found some issues:

1. the setting for time does not seem to work (probably because you're using diff names for reading and writing, maybe a refactor gone wrong? - "daily-update-hour" vs "hour-to-open-last-year-today-page") image

2. there are a lot of unused dependencies, could you clean those up? (probably from init code for the extension itself) image

  1. your solution to the problem of historical pages seems to be to only show that at the exact time. As you probably know yourself, issue with this is that if the user opens the graph at 9:01 am, they won't see the historical pages.
    Might I suggest a different solution? When you open the historical pages, you do something like extensionAPI.settings.set("last-opened-day", "01-07-2025");. And when you load the extension, you first check this setting. If value is same as today, do nothing, otherwise open the historical pages

@baibhavbista

Thank you for the detailed review. Here's my response:

  1. The hours setting issue has been fixed. The configuration key names have been standardized for consistency.

  2. I've cleaned up the unused dependencies.

  3. Thank you for the suggestion regarding the history pages implementation. I've modified the logic:

    • Users will see 3 history pages (configurable) immediately upon loading the extension
    • After initial load, pages will open based on the configured hour (defaults to 9 AM)
    • If the hour setting isn't configured, it uses the default value
    • This works well for both usage patterns:
      • Users who close Roam daily will see the history pages upon reopening
      • Users who keep Roam running will see pages at the configured time
    • Additionally, I've added keyboard shortcuts and commands for quickly opening/closing history pages

Regarding the testing issue with qcrao+last-year-today+969: I noticed that extension.js might not be updating correctly during testing. The local file works fine, but there might be caching issues in the test environment. One way to verify this is to check the default history page count in settings - it should now show 3 instead of the previous default of 1.

Could you please verify if you're experiencing similar testing issues on your end?

Please let me know if there are any other issues you'd like me to address.

image

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.

2 participants