Coder Social home page Coder Social logo

GoForward and GoBack components about mr-ui HOT 4 CLOSED

mapbox avatar mapbox commented on June 18, 2024
GoForward and GoBack components

from mr-ui.

Comments (4)

davidtheclark avatar davidtheclark commented on June 18, 2024

To be clear, I have almost no feelings about this, just want a standard version that we can use by default.

from mr-ui.

lshig avatar lshig commented on June 18, 2024

👋 I'm going to pick this up.

If there's no objection, I'm going to update ChevronousText before creating a GoLink. (It's open for a better name.)

I think it'd be valuable for ChevronousText to have a boolean iconBefore prop but by default have a chevron-right icon. In the GoLink component, I plan to use the updated ChevronousText component and give it the option to be bolded/unbolded or dark/light. This is also open for discussion, but I see GoLink wrapped by an <a /> tag, which may take the user straight to the URL or open a new tab.

This is part of the Accounts team's effort to consolidate our components and abstract them out to the shared libraries of components. For example we're looking to switch out the following Forward and Back components:

screen shot 2018-11-05 at 11 48 03 am
screen shot 2018-11-05 at 11 48 57 am

cc: @angel

from mr-ui.

davidtheclark avatar davidtheclark commented on June 18, 2024

ChevronousText does only one thing, really: it puts the icon after text and connects the icon to the last word of the text so that there is no possibility the icon will end up orphaned on another line. So it's only particularly useful for text that might be multiline and will include icons inline with the text. I think that's not the case for GoLinks (those should live on their own, outside of paragraphs, and be single lines) — so maybe IconText is more useful precedent for GoLink (rather than ChevronousText)?

from mr-ui.

lshig avatar lshig commented on June 18, 2024

It'd be ideal if they were always single lined texts, but in the past this was not always so due to marketing content, design layout (sidebars), font-size (medium, large), and device size (like mobile view). I'm in favor of having a robust and semi-flexible ChevronousText and/or IconText that can handle the icon being before/after the text, multiline, and prevent text wrap if the word next to it just so happens to be really long. This may be way in the future, but this would be beneficial for content that may need to be translated in other languages.

from mr-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.