asyncapi-react icon indicating copy to clipboard operation
asyncapi-react copied to clipboard

fix: added consistent styling for buttons and tags

Open hargunkaur286 opened this issue 1 year ago • 2 comments

Description

This PR is related to the issue with inconsistent styling. According to the issue, "WCAG 2.0 guideline 3.2.4 Consistent Identification states "Components that have the same functionality within a set of Web pages are identified consistently".

For example: If we move to async-react website, Screenshot 2024-10-20 at 3 12 13 AM We will notice that there are multiple elements with a solid color background, but only some of them are a button.

Changes proposed in this pull request:

To resolve this, the ask in the issue was:

  1. Buttons to be styled with rectangular outline.
  2. Tags to be styled with solid background.

In this PR, changes have been made in 4 files:

  1. In "library/src/components/Schema.tsx" file: Addresses the tags "Default values", "const", "Allowed values", "Example values". BEFORE: Screenshot 2024-10-20 at 3 30 26 AM

    AFTER: Screenshot 2024-10-20 at 3 30 08 AM

  2. In "library/src/containers/Messages/Message.tsx" file Addresses tags of "Correlation Id" and "Message Id" BEFORE: Screenshot 2024-10-20 at 3 32 54 AM AFTER:

Screenshot 2024-10-20 at 3 33 28 AM
  1. In "library/src/containers/Messages/MessageExample.tsx" file Addresses the example labels BEFORE: Screenshot 2024-10-20 at 3 35 03 AM

    AFTER:

    Screenshot 2024-10-20 at 3 35 32 AM
  2. In "library/src/containers/Operations/Operation.tsx" file BEFORE: Screenshot 2024-10-20 at 3 36 44 AM

    AFTER:

    Screenshot 2024-10-20 at 3 37 20 AM Screenshot 2024-10-20 at 3 37 44 AM

Related issue(s)

Resolves #960

hargunkaur286 avatar Oct 19 '24 22:10 hargunkaur286

To resolve this, the ask in the issue

  1. Buttons to be styled with rectangular outline.
  2. Tags to be styled with solid background.

I support this, also the changes are looking good.

However, I feel like there should be a py-1 added to some of the tags which are being converted to solid. image in the above 👆 example you can see that lightMeasured Message ID tags which you have made solid appear to be thinner than format: date-time

This is my opinion, Please let me know what you think about this.

catosaurusrex2003 avatar Oct 21 '24 14:10 catosaurusrex2003

@hargunkaur286 i don't think you should apply the changes to the messageExample.tsx file 🤔

@AceTheCreator @catosaurusrex2003 Thank you for the feedback. I have removed the changes from messageExample.tsx file

hargunkaur286 avatar Oct 23 '24 10:10 hargunkaur286

LGTM too 🚀

catosaurusrex2003 avatar Nov 04 '24 08:11 catosaurusrex2003

/rtm

AceTheCreator avatar Nov 15 '24 12:11 AceTheCreator

:tada: This PR is included in version 2.4.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Nov 29 '24 14:11 asyncapi-bot