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

fix(notion): Add extracting description from breadcrumbs as a fallback #2069

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

EternallLight
Copy link
Contributor

@EternallLight EternallLight commented Mar 31, 2022

🌟 What does this PR do?

The root cause of the issue was in missing title attribute on the button. The title is set during the TB initalization based on the description derived from the page content.

In Notion description is extracted from the page main section. There are cases where Toggl Button renders before the main section and it cannot get the description during the initialization.

The same title is available in the breadcrumbs that are rendered along with the Toggl Button is the top bar. As a fallback, I added extracting the description from the breadcrumbs last text value.

🐛 Recommendations for testing

Go to this page and run the timer.

Once the popdown is hidden, the button text should be "Stop timer".

📝 Links to relevant issues or information

Closes #2068

@EternallLight EternallLight requested a review from a team March 31, 2022 11:03
@EternallLight EternallLight self-assigned this Mar 31, 2022
@EternallLight EternallLight force-pushed the 2068/notion-button-issue branch from 7d93a10 to 1d44287 Compare March 31, 2022 11:04
Copy link
Contributor

@tiberiusuciu tiberiusuciu left a comment

Choose a reason for hiding this comment

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

Once the popdown is hidden, the button text should be "Stop button".

You probably meant Stop timer, if so, everything is working good now 👍

image

@EternallLight EternallLight merged commit 6d2f686 into master Apr 1, 2022
@EternallLight EternallLight deleted the 2068/notion-button-issue branch April 1, 2022 08:20
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.

Notion integration button issue
2 participants