dash icon indicating copy to clipboard operation
dash copied to clipboard

Allow strings in layout list

Open leeagustin opened this issue 8 months ago • 4 comments

Fixes #2890.

The problem was that strings were not allowed when the page layout was defined as a list. The issue only happens the first time—and not the second one after a refresh—because the layout validation using validate_layout() is only done the first time the page is accessed, resulting in the error dash.exceptions.NoLayoutException: List of components as layout must be a list of components only.

The solution is simply to allow strings to be included when the page layout is a list.

Contributor Checklist

  • [x] I have broken down my PR scope into the following TODO tasks
    • [x] Allows strings if layout is a list
  • [x] I have run the tests locally and they passed. (refer to testing section in contributing)
  • [x] I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • [x] I have added entry in the CHANGELOG.md
  • [ ] If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • [ ] this GitHub #PR number updates the dash docs
    • [ ] here is the show and tell thread in Plotly Dash community

leeagustin avatar Jun 22 '24 23:06 leeagustin