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

feat: add open calendar button #457

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

Conversation

Abdomash
Copy link
Contributor

@Abdomash Abdomash commented Dec 2, 2024

This PR resolves issue #424.

Adds a button to go to the Calendar page from the Settings page without opening the extension.

Additionally, I adjusted the settings page header to match the Figma (convert from ALL CAPS to Normal Case).

Before:

settings-page-before

After:

settings-page-after

This change is Reviewable

@Abdomash Abdomash force-pushed the feat/settings-page-navigation branch from ee479bd to 1171c5e Compare December 2, 2024 20:57
Copy link
Member

@IsaDavRod IsaDavRod left a comment

Choose a reason for hiding this comment

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

LGTM but I will need @Samathingamajig opinion on one thing: This button does not check if calendar tab already exists, so it just opens a new calendar tab every time it is clicked (unlike the calendar button in the extension popup). We do not have a fix (clicking the button 2-3 times in a short period should open the calendar) but what should we do with this PR in the meantime?

@Abdomash
Copy link
Contributor Author

Abdomash commented Dec 27, 2024

I'm basically using the same behavior as the settings button in the main calendar tab, which opens a new settings tab each time it is clicked. A potential fix would be to replace/modify the function openTabFromContentScript, which is used in both cases.

@IsaDavRod IsaDavRod linked an issue Jan 2, 2025 that may be closed by this pull request
5 tasks
@doprz
Copy link
Collaborator

doprz commented Jan 6, 2025

Please fix merge conflicts

@Abdomash
Copy link
Contributor Author

Abdomash commented Jan 6, 2025

done

Comment on lines +50 to +58
/**
* Opens the calendar page in a new tab.
* @returns A promise that resolves when the options page is opened.
*/
const handleOpenCalendar = async (): Promise<void> => {
const url = chrome.runtime.getURL('/calendar.html');
await openTabFromContentScript(url);
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

Seeing as this is a useful global util, we're planning on moving it somewhere else.

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.

[FEATURE] Navigating from the settings page to the calendar with a button
3 participants