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

fix: change schema name word breaking to anywhere #743

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

Laupetin
Copy link

Description

Changes proposed in this pull request:

  • Change schema name style word breaking to use overflow-wrap: anywhere to prevent content going under the sidebar when using long schema names that cannot be broken up into words.

Why is this an issue?
When using long names for schemas that cannot be broken up into words like when using Java package names, the content can go under the sidebar.
This makes the content unreadable to a large extent unless the window is made small enough for the sidebar to be put inside the burger menu.

When applying overflow-wrap: anywhere the browser will still try to wrap on words but also allows breaking up long, otherwise unbreakable strings to avoid overflowing.

Example

Previously:
Screenshot_20230728_173042

Afterwards:
Screenshot_20230728_173104

AsyncApi definition used for the example:
{
  "asyncapi": "2.4.0",
  "info": {
    "title": "Example API",
    "version": "0.1.0",
    "description": "An API for demonstration purposes"
  },
  "channels": {
    "exchange/my.routingkey": {
      "bindings": {
        "amqp": {
          "is": "routingKey",
          "queue": {
            "name": "my.routingkey"
          },
          "exchange": {
            "name": "exchange",
            "type": "topic"
          }
        }
      },
      "subscribe": {
        "description": "Informs about an example to be considered",
        "message": {
          "$ref": "#/components/messages/com.example.myapp.infrastructure._shared.messaging.dto.ExampleMessage"
        }
      }
    }
  },
  "components": {
    "messages": {
      "com.example.myapp.infrastructure._shared.messaging.dto.ExampleMessage": {
        "name": "Example message",
        "payload": {
          "type": "object",
          "properties": {
            "metadata": {
              "$ref": "#/components/schemas/com.example.myapp.infrastructure._shared.messaging.dto.SomeDtoClassThatIsUsedInsideAMessage"
            }
          }
        }
      }
    },
    "schemas": {
      "com.example.myapp.infrastructure._shared.messaging.dto.SomeDtoClassThatIsUsedInsideAMessage": {
        "name": "Example schema",
        "type": "object",
        "properties": {
          "testProperty": {
            "type": "string"
          }
        }
      }
    }
  }
}

Related issue(s)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide 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.

@sonarcloud
Copy link

sonarcloud bot commented Jul 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Laupetin Laupetin changed the title fix: Change schema name word breaking to anywhere fix: change schema name word breaking to anywhere Jul 28, 2023
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@derberg
Copy link
Member

derberg commented Aug 1, 2023

/rtm

@jonaslagoni
Copy link
Member

@derberg any update here?

@sonarcloud
Copy link

sonarcloud bot commented Sep 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@derberg
Copy link
Member

derberg commented Sep 4, 2023

/rtm

@derberg
Copy link
Member

derberg commented Sep 4, 2023

next is probably way behind with latest CI/CD workflows
merging manually

@derberg derberg merged commit 5be6cff into asyncapi:next Sep 4, 2023
8 checks passed
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.0.0-next.50 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Laupetin Laupetin deleted the fix-schema-name-word-breaking branch September 8, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants