Skip to content

Conversation

@UnderscoreShift
Copy link

What problem is this solving?

Allow usage of both phone and tablet widths for flex-layout.col.

How to test it?

Use below code:

{
  "store.home": {
    "blocks": [
      "flex-layout.row#responsive-tablet"
    ]
  },

  "flex-layout.row#responsive-tablet": {
    "children": [
      "flex-layout.col#left-column",
      "flex-layout.col#right-column"
    ]
  },

  "flex-layout.col#left-column": {
    "props": {
      "width": {
        "desktop": "33%",
        "phone": "55%"
      }
    },
    "children": ["rich-text#left-text"]
  },
  "flex-layout.col#right-column": {
    "children": ["rich-text#right-text"]
  },

  "rich-text#left-text": {
    "props": {
      "text": "## This column should adjust its width under 640px, between 641px and 1025px and above 1026px"
    }
  },
  "rich-text#right-text": {
    "props": {
      "text": "## This column doesn't need the `width` object declared"
    }
  }
}

Screenshots or example usage:

N/A

Describe alternatives you've considered, if any.

Most common layout shifts need to take place between desktop and tablet. The transition from tablet to mobile is mostly handled when preserveLayoutOnMobile is set to false.

Related to / Depends on

N/A

How does this PR make you feel? 🔗

N/A :)

@UnderscoreShift UnderscoreShift requested a review from a team as a code owner August 12, 2022 16:59
@vtex-io-ci-cd
Copy link
Contributor

vtex-io-ci-cd bot commented Aug 12, 2022

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Aug 12, 2022

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@UnderscoreShift UnderscoreShift requested review from filipewl, gvc and tlgimenes and removed request for a team August 12, 2022 16:59
@UnderscoreShift
Copy link
Author

Version do you want to release:

Minor (backwards-compatible functionality)

Add example for `responsive-values`.
@UnderscoreShift UnderscoreShift requested a review from a team as a code owner August 18, 2022 11:58
@UnderscoreShift UnderscoreShift requested review from marcellasiqueira and removed request for a team August 18, 2022 11:58
@digital-forge-mn
Copy link

I've released a beta version so you can test @UnderscoreShift

vtex.flex-layout@0.20.1-beta.0

Change isResponsiveInput conditions
Ops, correct indent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants