Giter Site home page Giter Site logo

Comments (7)

jensoleg avatar jensoleg commented on July 21, 2024

Hi @ddaguro

A possible solution is making the css overflow hidden on the label. This will cut the label and avoid flowing into the input field.

Do you think of other solutions ?

from swagger-ui.

dmyers avatar dmyers commented on July 21, 2024

Yeah I've ran into this too, but I haven't though of a clean design style.

from swagger-ui.

ddaguro avatar ddaguro commented on July 21, 2024

@jensoleg I think the oveflow hidden on label might be a good idea, especially if you're able to append an ellipse to indicate overflow. Then perhaps upon hover it could use the title attribute to show the full name of the parameter. I'll try to think of some other cleaner ways.

from swagger-ui.

jensoleg avatar jensoleg commented on July 21, 2024

I have two suggestions to solve this

Abbreviate and mark with ellipsis:

white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

swagger explorer 2

Wrap the string with:

word-wrap: break-word;

wrap

I think abbreviating the text with ellipsis is the way to go ?

from swagger-ui.

jensoleg avatar jensoleg commented on July 21, 2024

Added abbreviation of parameter text and tooltip. Tooltip is placed on input/textarea field.

Commit: 8fdb4af

from swagger-ui.

ddaguro avatar ddaguro commented on July 21, 2024

This is perfect! And I like how the tooltip shows on hover of the form field. Thumbs up.

from swagger-ui.

mike-seagull avatar mike-seagull commented on July 21, 2024

@jensoleg Would it be possible to make the parameter text above or below the input/textarea field?

from swagger-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.