镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Data Override Not Working As Expected #373

Description

@frostyweather

I am using Pattern Lab PHP on Mac, using Grunt.

Created a new PL2 Project. Added atoms-/button and molecules-button-list to the project.

atoms/button markup:

<button class="button">

    <span class="button__text">
        {{# buttonText }}
        {{ buttonText }}
        {{/ buttonText }}
    </span>

</button>

I have the molecules/button-list marked up as:

<ul class="button-list">
    {{# buttonList }}
    <li class="button-list__item">{{> atoms-button }}</li>
    {{/ buttonList }}
</ul>

In data.json I have:

  "buttonList" :  [
        {},
        {},
        {},
        {},
        {},
        {},
        {},
        {},
        {},
        {},
        {},
        {}
  ]  

In my button-test page's JSON button-test.json, I have:

"buttonList" : [
        {
            "buttonText" : "Test1"
        },
        {
            "buttonText" : "Test2"
        }
    ]

Expected Behavior

Removed buttonList altogether from data.json and defined it only in button-test.json to get this:
screen shot 2016-09-01 at 2 57 22 pm

Actual Behavior

Page-based JSON overrides the first 2 items in data.json but prints out the rest of the items from buttonList

screen shot 2016-09-01 at 3 02 37 pm

According to Brad, it seems like a regression bug of some sort.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions