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

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

Open
2 tasks done
pablomorsch opened this issue Mar 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@pablomorsch
Copy link

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?

  • 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 pablomorsch added the bug Something isn't working label Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

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.

@maehata-fairy
Copy link

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"
    },

@derberg
Copy link
Member

derberg commented Mar 14, 2024

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 derberg transferred this issue from asyncapi/html-template Mar 14, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants