Skip to content

Bug - DashboardHeader - update image url to absolute path #7934

@evwilkin

Description

@evwilkin

Describe the problem
DashboardHeader uses a relative path for the Brand src, but this is causing the image to break in Codesandbox examples. Updating to an absolute path from @patternfly/react-core will solve this issue while continuing to work with live/full page examples.

While we can do some string manipulation for relative import paths for components exposed in the Codesandbox code, this component is imported by DashboardWrapper in all Codesandbox examples and so we do not have direct access to edit the import path when the code is passed over to Codesandbox.

How do you reproduce the problem?
Update the DashboardWrapper import path to point to the full path from the @patternfly/react-core package and see that the demo does load but the Brand image in the DashboardHeader is broken due to the relative path referring to the patternfly.org website, as seen in this edited Primary detail card view demo:

Expected behavior
The DashboardHeader should load the image correctly regardless of the context - workspace, pf.org website, or codesandbox.

Any other information?
patternfly/patternfly-org#3122 is a WIP PR to fix relative import paths in codesandbox code, this PR will fix the image loading correctly while that PR fixes the demos loading at all in Codesandbox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions