Skip to content

Conversation

@zeroedin
Copy link
Contributor

@zeroedin zeroedin commented Jun 8, 2023

What I did

  1. Corrects aliased elements redirects in dev-server

Testing Instructions

  1. Dev Server locally add the configuration from the .pfe.config.json below:

Notes to Reviewers

Given a .pfe.conf.json with the following contents:

{
  "renderTitleInOverview": false,
  "aliases": {
    "pf-modal": "Marvelous Modals",
    "pf-tabs": "Terrific Tabs",
    "pf-clipboard-copy": "Making Copies",
    "pf-tile": "Tantalizing Tiles"
  }
}

A request to pf-modals demo.css would produce a URL in the dev-server as:

http://localhost:8000/components/magnificent-modal/demo/demo.css

Using deslugify we take the magnificient-modal slug and check for an alias and return it, If there is no alias we simply return the original path requested ensuring it has the correct tag prefix.

http://localhost:8000/components/magnificent-modal/demo/demo.css
Redirects to =>
http://localhost:8000/components/pf-modal/demo/demo.css

@changeset-bot
Copy link

changeset-bot bot commented Jun 8, 2023

🦋 Changeset detected

Latest commit: 0b3c234

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@patternfly/pfe-tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added tools Development and build tools work in progress POC / Not ready for review labels Jun 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit f7a62ad
😎 Deploy Preview https://deploy-preview-2512--patternfly-elements.netlify.app/

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the AT passed Automated testing has passed label Jun 8, 2023
Copy link
Contributor

@nikkimk nikkimk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lobsters get terribly mean

@zeroedin zeroedin requested review from bennypowers and eyevana June 9, 2023 20:48
@zeroedin zeroedin marked this pull request as ready for review June 9, 2023 20:48
@zeroedin zeroedin merged commit 7611324 into main Jun 15, 2023
@zeroedin zeroedin deleted the fix/dev-server/handle-aliases branch June 15, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AT passed Automated testing has passed tools Development and build tools work in progress POC / Not ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants