Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

Drop constants and color-ops from v8 #308

Closed
jfirebaugh opened this issue Jun 30, 2015 · 7 comments
Closed

Drop constants and color-ops from v8 #308

jfirebaugh opened this issue Jun 30, 2015 · 7 comments
Assignees
Milestone

Comments

@jfirebaugh
Copy link
Contributor

No description provided.

@jfirebaugh jfirebaugh added this to the v8 milestone Jun 30, 2015
@jfirebaugh
Copy link
Contributor Author

Deep breath. Constants are gone from the editor. Do we want to drop them from the spec and renderers?

@tmcw tmcw mentioned this issue Aug 10, 2015
82 tasks
@lucaswoj
Copy link

Just had a good chat with @tmcw, @nickidlugash, and others about this.

It sounds like there's a good case for removing constants and color ops from the v8 spec because

  • app doesn't support constants or color-ops
  • the current implementation of color-ops hasn't been tested in the wild ("unused code is broken by default")
  • changing the spec for color-ops after they have been released would create headaches
  • removing / restoring color-ops from gl-js or gl-native only involves ~10 LOC
  • we don't want to lose any information when importing / exporting styles from app (i.e. if color-ops were in the spec but not supported in app)
  • no styles currently use color-ops

@lucaswoj lucaswoj changed the title drop constants Drop constants and color-ops from v8 Aug 10, 2015
@lucaswoj
Copy link

Ref #38

@lucaswoj
Copy link

I think the right way forward is to remove both constants and color-ops from v8. We might want to work them into a future release.

@lucaswoj
Copy link

@mb12
Copy link

mb12 commented Aug 12, 2015

@jfirebaugh What is the reason for this change? Does that mean we have to start inlining a constant that is used in multiple places in the style.json? For e.g. it is better to refer to a constant like this via a meaningful name rather than inline it.

    "@motorway_casing_width": {
      "base": 1.2,
      "stops": [[5, 0.4], [6, 0.6], [7, 1.5], [20, 22]]
    },

@jfirebaugh
Copy link
Contributor Author

@mb12 We are keeping the style spec tightly focused around the core features needed by the renderers and by our online style editor (launching publicly soon). Constants don't fall into either of those categories. If you are editing styles by hand and want to use constants, you can use a preprocessing step with a tool like https://github.com/screee/screess.

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

No branches or pull requests

4 participants