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: DIA-1767: Move FE Tour component to LSO #6907

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from
Draft

Conversation

niklub
Copy link
Collaborator

@niklub niklub commented Jan 14, 2025

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

(link to issue, supportive screenshots etc.)

What does this fix?

(if this is a bug fix)

What is the new behavior?

(if this is a breaking or feature change)

What is the current behavior?

(if this is a breaking or feature change)

What libraries were added/updated?

(list all with version changes)

Does this change affect performance?

(if so describe the impacts positive or negative)

Does this change affect security?

(if so describe the impacts positive or negative)

What alternative approaches were there?

(briefly list any if applicable)

What feature flags were used to cover this change?

(briefly list any if applicable)

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)

@github-actions github-actions bot added the fix label Jan 14, 2025
Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 8b22b58
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/6787e78956570c00081f4ca2

Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 8b22b58
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/6787e78991bae100080d2cd3

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.94%. Comparing base (1e767ef) to head (8b22b58).
Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
label_studio/users/product_tours/serializers.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6907   +/-   ##
========================================
  Coverage    76.94%   76.94%           
========================================
  Files          175      175           
  Lines        14139    14139           
========================================
  Hits         10879    10879           
  Misses        3260     3260           
Flag Coverage Δ
pytests 76.94% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

const setTourViewed = useCallback(
(name: string, isSkipped: boolean, interactionData: Record<string, any> = {}) => {
// TODO: currently we don't have per-tour complete state, so we just update the global state
updateProductTourState(api, name, isSkipped ? "skipped" : "completed", interactionData);
Copy link
Contributor

Choose a reason for hiding this comment

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

updateProductTourState returns a promise that we're not awaiting here or in restartTour which means we fire the request and dont care if it resolves as expected or not - is that intended?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think so, it depends on the particular usage of this function. Right now, we just need to set flag on backend to prevent tour reappearing next time. But this can be done async, no reason for waiting. But I'll put it inside updateProductTourState for clarity

Comment on lines +116 to +122
tooltip: {
width: "468px",
},
options: {
primaryColor: "var(--primary_link)",
textColor: "var(--sand_900)",
overlayColor: "rgba(0, 0, 0, 0.5)",
Copy link
Contributor

Choose a reason for hiding this comment

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

can we define the width and the overlayColor using a css variable instead of hard setting them here? this will make future theming and white labeling efforts easier

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Only takes in these style props, doesn't appear to have that option unfortunately.

Copy link
Contributor

Choose a reason for hiding this comment

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

We'll have to dig more into that 🙁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants