appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: Modal Accessibility and copy paste.

Open marks0351 opened this issue 1 year ago • 4 comments

workerB

Description

In this Pr we are tackling a few issues.

  • disallow copy pasting modals into other widgets instead always paste them on the main canvas.
  • disable modal header and footer accessibility in edit mode.
  • make sure edit mode based wrappers are not wrapped for skeleton widget.
  • make sure widget name is not shown for skeleton widget.
  • fixed random errors in the withWidgetProps flow
  • removed unwanted invocation of setting highlights.

Fixes #33382 Fixes #32923

or
Fixes Issue URL

[!WARNING]
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

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

:mag: Cypress test results

[!TIP] 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9107042945 Commit: 35fafa6eb95547046dc6bfac9b1936b95864a04f Cypress dashboard url: Click here!

Communication

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

  • [ ] Yes
  • [x] No

marks0351 avatar May 16 '24 05:05 marks0351

Walkthrough

Walkthrough

The recent updates focus on enhancing modal components with the addition of the excludeFromTabOrder property for improved accessibility control. Changes also address widget rendering and drag-and-drop behavior in the Anvil editor, aiming to enhance user experience and code maintainability.

Changes

Files Change Summary
.../Modal/src/ModalFooter.tsx, .../Modal/src/ModalHeader.tsx, .../Modal/src/types.ts Introduced excludeFromTabOrder property for managing tab order in modal components.
.../AnvilEditorWidgetOnion.tsx, .../AnvilWidgetName/index.tsx Updated logic for widget handling based on SKELETON_WIDGET_TYPE and excluded widget name display for specific types.
.../AnvilDragPreview/AnvilDragPreviewComponent.tsx, .../hooks/useAnvilDnDEvents.ts Enhanced drag preview behavior to stay within the visible area and conditionally reset canvas state on drag end.
.../widgets/withWidgetProps.tsx, .../integrations/sagas/pasteSagas.ts Improved error handling logic in widget rendering and introduced specific handling for pasting modal widgets.

Assessment against linked issues

Objective Addressed Explanation
Prevent pasting modal widget into another modal widget (#33382)
Ensure widgets render without appearing as tiny boxes first (#32923) The changes primarily focus on modal and widget handling improvements, not directly related to initial widget rendering issues.

Recent Review Details

Configuration used: CodeRabbit UI Review profile: CHILL

Commits Files that changed from the base of the PR and between 7a41a8d6bd2b4a97acfb404acfb208170c79b9d4 and 05d011bc23329159c4d603e31690782119e1908a.
Files selected for processing (1)
  • app/client/packages/design-system/widgets/src/components/Modal/src/ModalHeader.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/packages/design-system/widgets/src/components/Modal/src/ModalHeader.tsx

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

coderabbitai[bot] avatar May 16 '24 05:05 coderabbitai[bot]

/build-deploy-preview skip-tests=true

marks0351 avatar May 16 '24 10:05 marks0351

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9110388245. Workflow: On demand build Docker image and deploy preview. skip-tests: true. env: ``. PR: 33509. recreate: .

github-actions[bot] avatar May 16 '24 10:05 github-actions[bot]

Deploy-Preview-URL: https://ce-33509.dp.appsmith.com

github-actions[bot] avatar May 16 '24 10:05 github-actions[bot]