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

docs: update dockLayout references #362

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

miralemd
Copy link
Contributor

@miralemd miralemd commented Apr 5, 2019

BREAKING CHANGE: rect is now a reserved keyword for components

Breaking

A lot of examples used the beforeRender lifecycle method to set this.rect on the component:

beforeRender(opts) {	
  this.rect = opts.size;	
},

💥 rect is now a reserved keyword and automatically set on all components by the layout strategy. Trying to assign a value to rect inside a component will throw an error.

The actual breaking PR is #354, but it did not contain any BREAKING CHANGE comment, so adding it in this commit instead.

Deprecated

Properties related to the layout strategy have been moved one step down into a layout object, while dockLayout has been renamed to strategy:

Before

picasso.chart({
  settings: {
    dockLayout: { // deprecated, use strategy instead
      logicalSize: { width: 400, height: 300 }
    },
    components: [{
      type: 'point',
      dock: 'left', // deprecated, use layout.dock instead 
      prioOrder: 1, // deprecated, use layout.prioOrder instead
      displayOrder: 2, // deprecated, use layout.displayOrder instead
      minimumLayoutMode: 'SMALL' // deprecated, use layout.minimumLayoutMode instead
    }]
  }
});

After

picasso.chart({
  settings: {
    strategy: {
      logicalSize: { width: 400, height: 300 }
    },
    components: [{
      type: 'point',
      layout: {
        dock: 'left',
        prioOrder: 1,
        displayOrder: 2,
        minimumLayoutMode: 'SMALL'
      }
    }]
  }
});

BREAKING CHANGE: rect is now a reserved keyword for components
@miralemd miralemd requested a review from nilzona April 5, 2019 14:26
@nilzona
Copy link
Collaborator

nilzona commented Apr 5, 2019

Maybe mention the change of dockLayout -> strategy property that is part of this PR?

@miralemd miralemd merged commit 68c5251 into qlik-oss:master Apr 5, 2019
@miralemd miralemd deleted the breaking-docs branch April 5, 2019 14:38
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