Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Link not working with pattern parameters in action #102

Closed
bradfrost opened this issue Apr 21, 2017 · 6 comments
Closed

Link not working with pattern parameters in action #102

bradfrost opened this issue Apr 21, 2017 · 6 comments
Assignees
Labels

Comments

@bradfrost
Copy link
Member

Expected Behavior

Using link in JSON, such as:

{
    "url": "link.pages-homepage"
}

Should render links correctly when pattern parameters are in place, such as:

{{> organisms-header(styleModifier: "c-header--vertical") }}
Actual Behavior

The {{ url }} field is replaced with link.pages-homepage, resulting in a link that looks like <a href="link.pages-homepage">. This returns a 404 page when clicked.

Steps to Reproduce
  1. Create a link to another Pattern Lab page in JSON.
  2. Include a component that includes the desired link while passing in pattern parameters.
  3. Click the link
@bradfrost bradfrost added the bug label Apr 21, 2017
@bmuenzenmeyer bmuenzenmeyer self-assigned this Apr 21, 2017
@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Apr 21, 2017

in an unlikely workaround scenario, does

{{> organisms-header:c-header--vertical }}

work instead?

(pattern parametes are buggy - i wonder if using only the stylemodier syntax would work) http://patternlab.io/docs/pattern-stylemodifier.html

@frostyweather
Copy link

@bmuenzenmeyer That seemed to do the trick workaround wise.

Since we were naming the styleModifier headerStyleModifier, we used a different workaround that wrapped the header in {{# styleguideHeader }}{{/ styleGuideHeader }} and used the JSON file to change the modifier:

"styleguideHeader" : {
        "headerStyleModifier" : "c-header--vertical"
 }

@bmuenzenmeyer
Copy link
Member

good. sorry for the inconvenience. after some client work finishes up i plan to re-focus again more on issues such as these.

as we've always maintained.... the more you use pattern parameters, the more trouble you get into 😱

@frostyweather
Copy link

@bmuenzenmeyer No worries, just glad there's a workaround for now. Thanks!

@bmuenzenmeyer
Copy link
Member

I've fixed this, and perhaps found the source of many other bugs due to an order of operations problem with core. Look for an official release soon.

@bmuenzenmeyer
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants