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

[BUG] REQUEST/REPLY operations on navigation panel are not visible due to low contrast between font and background colors

Open pablomorsch opened this issue 1 year ago • 4 comments

Describe the bug.

For AsyncAPI version 3.0.0, if a "send" or "receive" operation has a "reply" parameter, the documentation adds a tag with text "REPLY" or "REQUEST". The problem is that the font color and the background color are too similar (white / light gray) so the text is not visible.

Expected behavior

Better contrast between background color and text color to make the text readable.

Screenshots

End result:

low_contrast

How to Reproduce

Spec example:

...
operations:
  ConnectionRequest:
    action: send
    channel:
      $ref: "#/channels/RequestConnection"
    messages:
      - $ref: "#/channels/RequestConnection/messages/ConnectionRequest"
    reply:
      channel:
        $ref: "#/channels/ResponseConnection"
      messages:
        - $ref: "#/components/messages/ConnectionResponse"
...

🥦 Browser

Google Chrome

👀 Have you checked for similar open issues?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

No, someone else can work on it

pablomorsch avatar Mar 01 '24 13:03 pablomorsch

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Mar 01 '24 13:03 github-actions[bot]

I'm also having the same problem. ( "@asyncapi/html-template": "2.1.7" ) I think this is because ".bg-orange-600" is not defined in css. As a hotfix, I created the following script and inserted it into the automatically generated css file.

  • hotfix.js
const fs = require('fs');
const cssFilePath = '/path/to/output/css/asyncapi.min.css';
const additionalAttribute = '.aui-root .bg-orange-600 {--tw-bg-opacity: 1;background-color: rgba(252, 148, 3, var(--tw-bg-opacity))}';

fs.readFile(cssFilePath, 'utf8', (err, data) => {
    if (err) {
        console.error(err);
        return;
    }

    const modifiedData = data + '\n' + additionalAttribute;

    fs.writeFile(cssFilePath, modifiedData, 'utf8', (err) => {
        if (err) {
            console.error(err);
            return;
        }
    });
});
  • package.json
    "scripts": {
        "build": "ag xxx.yml @asyncapi/html-template -o </path/to/output> --force-write && node /path/to/hotfix.js"
    },

maehata-fairy avatar Mar 04 '24 23:03 maehata-fairy

I'm moving it to react component repo where the responsible component is. Would be great if anyone can propose a change in a PR

derberg avatar Mar 14 '24 08:03 derberg

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Mar 14 '24 08:03 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jul 13 '24 00:07 github-actions[bot]

:tada: This issue has been resolved in version 2.2.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Aug 21 '24 19:08 asyncapi-bot