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

chore: Update mixpanel masking classname #38661

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented Jan 15, 2025

Description

update classname for masking from mp-mask to as-mask to avoid conflict with existing mixpanel masking systems

Fixes #38463

Automation

/ok-to-test tags="@tag.All"

🔍 Cypress test results

Caution

🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12784512736
Commit: 9dd68c5
Cypress dashboard.
Tags: @tag.All
Spec:
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ClientSide/Binding/Button_Text_WithRecaptcha_spec.js
List of identified flaky tests.
Wed, 15 Jan 2025 10:07:21 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

Release Notes

  • Style

    • Updated CSS class names from mp-mask to as-mask across multiple components and files
    • Refined styling for tables, log items, and various UI elements
  • Chores

    • Minor updates to class selectors in test locators and analytics configuration

The changes primarily focus on consistent styling and class naming conventions throughout the application, with no significant functional modifications.

Copy link
Contributor

coderabbitai bot commented Jan 15, 2025

Walkthrough

This pull request involves a systematic replacement of the CSS class name from mp-mask to as-mask across multiple files in the client application. The changes span various components including locators, support files, React components, and utility scripts, indicating a comprehensive styling or tracking update that maintains the existing functionality while modifying the class name used for masking or identifying specific elements.

Changes

File Path Change Summary
app/client/cypress/locators/QueryEditor.json Updated XPath selector, replacing mp-mask with as-mask
app/client/cypress/support/Pages/DataSources.ts Modified XPath selector for query table response
app/client/cypress/support/commands.js Updated XPath selectors in pagination response validation commands
Multiple React Components Replaced mp-mask class with as-mask in various components like Table.tsx, PeekOverlayPopup.tsx, LogItem.tsx, etc.
app/client/src/utils/Analytics/mixpanel.ts Updated Mixpanel text selector from .mp-mask to .as-mask

Possibly related PRs

Suggested Labels

skip-changelog, ok-to-test, Bug

Suggested Reviewers

  • ApekshaBhosale
  • sagar-qa007
  • ankitakinger

Poem

Masks of code, a subtle dance,
From 'mp' to 'as', a class's new stance
Selectors shift, but logic stays true
A refactoring ballet, clean and new! 🕺💻


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a23bcbf and df0f0d6.

📒 Files selected for processing (11)
  • app/client/cypress/locators/QueryEditor.json (1 hunks)
  • app/client/cypress/support/Pages/DataSources.ts (1 hunks)
  • app/client/cypress/support/commands.js (2 hunks)
  • app/client/src/PluginActionEditor/components/PluginActionResponse/components/Table.tsx (5 hunks)
  • app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx (1 hunks)
  • app/client/src/components/editorComponents/Debugger/LogItem/LogItem.tsx (3 hunks)
  • app/client/src/components/editorComponents/Debugger/StateInspector/StateInspector.tsx (1 hunks)
  • app/client/src/components/editorComponents/ReadOnlyEditor.tsx (1 hunks)
  • app/client/src/pages/AppViewer/AppPage/AppPage.tsx (1 hunks)
  • app/client/src/pages/Editor/Canvas.tsx (1 hunks)
  • app/client/src/utils/Analytics/mixpanel.ts (1 hunks)
✅ Files skipped from review due to trivial changes (7)
  • app/client/src/components/editorComponents/ReadOnlyEditor.tsx
  • app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx
  • app/client/src/components/editorComponents/Debugger/StateInspector/StateInspector.tsx
  • app/client/src/pages/Editor/Canvas.tsx
  • app/client/src/pages/AppViewer/AppPage/AppPage.tsx
  • app/client/src/components/editorComponents/Debugger/LogItem/LogItem.tsx
  • app/client/cypress/support/commands.js
🧰 Additional context used
📓 Path-based instructions (2)
app/client/cypress/locators/QueryEditor.json (1)

Pattern app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:

  • Follow best practices for Cypress code and e2e automation.
  • Avoid using cy.wait in code.
  • Avoid using cy.pause in code.
  • Avoid using agHelper.sleep().
  • Use locator variables for locators and do not use plain strings.
  • Use data-* attributes for selectors.
  • Avoid Xpaths, Attributes and CSS path.
  • Avoid selectors like .btn.submit or button[type=submit].
  • Perform logins via API with LoginFromAPI.
  • Perform logout via API with LogOutviaAPI.
  • Perform signup via API with SignupFromAPI.
  • Avoid using it.only.
  • Avoid using after and aftereach in test cases.
  • Use multiple assertions for expect statements.
  • Avoid using strings for assertions.
  • Do not use duplicate filenames even with different paths.
  • Avoid using agHelper.Sleep, this.Sleep in any file in code.
app/client/cypress/support/Pages/DataSources.ts (1)

Pattern app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:

  • Follow best practices for Cypress code and e2e automation.
  • Avoid using cy.wait in code.
  • Avoid using cy.pause in code.
  • Avoid using agHelper.sleep().
  • Use locator variables for locators and do not use plain strings.
  • Use data-* attributes for selectors.
  • Avoid Xpaths, Attributes and CSS path.
  • Avoid selectors like .btn.submit or button[type=submit].
  • Perform logins via API with LoginFromAPI.
  • Perform logout via API with LogOutviaAPI.
  • Perform signup via API with SignupFromAPI.
  • Avoid using it.only.
  • Avoid using after and aftereach in test cases.
  • Use multiple assertions for expect statements.
  • Avoid using strings for assertions.
  • Do not use duplicate filenames even with different paths.
  • Avoid using agHelper.Sleep, this.Sleep in any file in code.
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (4)
app/client/src/utils/Analytics/mixpanel.ts (1)

49-49: LGTM! Verify class name update consistency.

The change from .mp-mask to .as-mask in the Mixpanel configuration looks good.

Let's verify the class name update across the codebase:

✅ Verification successful

Class name update verification completed successfully

The migration from .mp-mask to .as-mask has been consistently applied across all components, with no remaining instances of the old class name.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining instances of the old class name
# and confirm all instances have been updated to the new class name

echo "Checking for any remaining mp-mask instances:"
rg -l "mp-mask"

echo "Verifying as-mask usage:"
rg -l "as-mask"

Length of output: 855

app/client/src/PluginActionEditor/components/PluginActionResponse/components/Table.tsx (1)

340-340: LGTM! Class names updated consistently.

The class name changes from mp-mask to as-mask in the table component are consistent with the new naming convention.

Also applies to: 375-375

app/client/cypress/support/Pages/DataSources.ts (1)

150-150: LGTM! Test selector updated correctly.

The XPath selector update from mp-mask to as-mask maintains test coverage consistency with the UI changes.

app/client/cypress/locators/QueryEditor.json (1)

12-12: LGTM! Locator updated consistently.

The query response locator update from mp-mask to as-mask aligns with the UI changes.

Finishing Touches

  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jan 15, 2025
@hetunandu hetunandu added the ok-to-test Required label for CI label Jan 15, 2025
@github-actions github-actions bot added IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo labels Jan 15, 2025
@hetunandu hetunandu merged commit 446eb2b into release Jan 15, 2025
81 of 83 checks passed
@hetunandu hetunandu deleted the fix/mixpanel-masking branch January 15, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Mixpanel recordings do not follow masking rules
2 participants