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

Breaking Changes For the next version #2207

Open
Jarvis1010 opened this issue Nov 29, 2023 · 1 comment
Open

Breaking Changes For the next version #2207

Jarvis1010 opened this issue Nov 29, 2023 · 1 comment

Comments

@Jarvis1010
Copy link
Contributor

Jarvis1010 commented Nov 29, 2023

Removals

  • MasonaryGrid: Doesn't always function consistently in current versions of React. Masonry grid will also be a first-class support via CSS in the near future.
    • Add a "masonry" variant to the Grid. :
    • grid-template-rows: masonry;
    • masonry-auto-flow: next ;
  • PadBox: implementation is awkward, and in all reality, this is not a layout component, a component that directly controls the size or position of its children.
  • AppBoundary: Is just an opinionated version of Center and serves little value.
  • all the hooks and auxiliary code: is only around to support the Masonry grid. I would prefer not to keep it in the library if it's not supporting parts of the library.

Changes

  • Change gutter to gap
  • change columns prop to colCount
  • Have a single list of sizes instead of a separate list of space and sizes?
  • Augment Stack to adjust alignment
  • customer properties should be kabab-cased and not camelCase
  • Default inline components to align center
  • Add space-around to inline components
  • Do we need both do we need both inline and inline cluster?
  • remove default sizes and make them 100%
  • change awkward boolean props to state props e.g. noStretchColumns:boolean to something like columnType: 'stretch' | 'auto'
  • Separate Provider package and spacing constant should be used by solid and React version
    • context and themeProvider doesn't work with Server components. We probably need to move away form it.
  • spacing constants should be noted as not following semver
  • Cover should stop using top and bottom props and instead use a CoverCentered component, much like how the underlying CSS works
  • remove center-children from center component, it should be handled by using the stack and justify:center

Reset update

headings{
   text-wrap: balance
}
*{
min-width:0;
}
all other text or maybe just p{
  text-wrap:pretty
}
@media (prefers-reduced-motion: no-preference){
   :has(:target){
      scroll-behavior: smooth;
      scroll-padding-top: 3rem;
   }
}
html {
   hanging-punctuation: first last;
}

image reset:

img{
  /* remove display:block */
   max-width:100%;
   vertical-align: middle;
   height: auto;
   font-style: italic;

/* to have a low-res version of image as background-image */
   background-repeat: no-repeat;
   background-size: cover;

   shape-margin: 1rem;
   
}
@Jarvis1010
Copy link
Contributor Author

Jarvis1010 commented Jan 22, 2024

Planned Breaking Changes

There is a plan to make some breaking changes in the next version of the library. These changes are necessary to improve the library and make it more consistent.

The breaking changes are as follows:

  • deprecate components and hooks in React and Solid
    • MasonryGrid
    • Padbox
    • AppBoundry
    • useForwardedRef
    • useResizeObserver
    • useContainerQuery
    • useStatefulRef
    • register-resize-callback
  • deprecate the center-children prop from the center components and recommend that they use the Stack component instead
  • document deprecation of original Solid repo and do PR at Solid Docs to point to monorepo where the solid components are now located
  • deprecate the columns prop from the columns components and recommend that they use the colCount prop instead
  • deprecate the gutter prop from applicable components and recommend that they use the gap prop instead
  • deprecate the noStretchColumns prop from the ColumnDrop component and recommend that they use the variant:centered prop instead
  • deprecate the stretchContent prop from the Cover component and recommend that they use the variant:stretch-content prop instead
  • remove above deprecated components and hooks
  • remove the stretch-content prop from the cover components
  • remove the center-children prop from the center components
  • remove the columns prop from the columns components
  • remove the gutter prop from applicable components
  • remove the camelCase custom properties in favor of kebab-case custom properties, e.g. --min-item-width instead of --minItemWidth
  • change the default alignment for the Inline and InlineCluster components to center instead of start
  • change default widths for components to be 100% instead of specific widths/heights
  • remove the noStretchColumns prop from the ColumnDrop component
  • remove the data-bedrock- css selectors in favor of data-br- css selectors
  • remove the ThemeProvider component and related theme hooks
  • make spacing constants able to be used by both react and solid. Also make a note that the spacing constants will no longer follow semver and will be updated as needed
  • React and Solid will no longer use top and bottom props for slots and will instead export a component for the content that needs to be vertically centered

Note: The breaking changes will be released in a major version bump, so you will need to update your code to use the new version of the library. Also those items marked with a checkmark (deprecation items) have already been implemented and are available in the latest version of the library.

Non-breaking Changes

The following are some of the non-breaking changes that are planned for the next version of the library. The items marked with a checkmark have already been implemented and are available in the latest version of the library.

  • Add variant:masonry to grid in both CSS and react/solid
  • Add support for gap prop
  • Add support for colCount prop
  • Add support for the variant:centered prop for the ColumnDrop component to replace the noStretchColumns prop
  • Add support for the variant:stretch-content prop for the Cover component to replace the stretchContent prop
  • Add support for the "-br-" in the attributes e.g,. data-br-grid or data-br-stack instead of data-bedrock-grid or data-bedrock-stack
  • Add support for size props in CSS strings e.g., data-br-grid="minItemWidth:sizeContent3"
  • Add alignment props to stack component
  • add support for space-around for inline and inline cluster
  • Add support for Kebab case on custom properties

Jarvis1010 added a commit that referenced this issue Feb 16, 2024
Adding a masonry variant to the grid css.  This will allow for future removal of the MasonryGrid
components and the extra JS needed to support them

re #2207
Jarvis1010 added a commit that referenced this issue Feb 19, 2024
in the future all custom properties that are considered "public" will be kebab case. This adds
support for that and encourages it's use as the primary use case.  In the next version we will be
removing  camelCase propeties.

re #2207
Jarvis1010 added a commit that referenced this issue Mar 6, 2024
This prop will allow the stack to align the children inline

re #2207
Jarvis1010 added a commit that referenced this issue Mar 7, 2024
Deperecates the old columns prop and adds the prefered colCount prop

re #2207
Jarvis1010 added a commit that referenced this issue Mar 8, 2024
This commit opens up being able to use size constants for width based properties such as
`data-bedrock-center="maxWidth:sizeXl"`

re #2207
@Jarvis1010 Jarvis1010 mentioned this issue Mar 26, 2024
Jarvis1010 added a commit that referenced this issue Mar 27, 2024
This will add better documentation on the future of Bedrock Layout

re #2207
Jarvis1010 added a commit that referenced this issue Apr 10, 2024
as we get ready to make breaking changes to bedrock, we are supporting as much of the forward style
as possible.  This is the final thing before we start making breaking changes"

re #2207
Jarvis1010 added a commit that referenced this issue Apr 10, 2024
in preperation for making breaking changes, we will support both data-bedrock-[component] and
data-br-[component].  In a future breaking change we will remove the former.

re #2207
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

No branches or pull requests

1 participant