Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning on not to use each #123

Closed
realthargor opened this issue Aug 6, 2018 · 1 comment · Fixed by #228
Closed

Warning on not to use each #123

realthargor opened this issue Aug 6, 2018 · 1 comment · Fixed by #228

Comments

@realthargor
Copy link

The spec files refers to a missing warning for the usage of each-helper which should be avoid.
The usage of foreach-helper is preferred.

@kirrg001
Copy link
Contributor

kirrg001 commented Aug 6, 2018

That is true. Thanks for looking at the code 👍

@naz naz closed this as completed in #228 May 3, 2019
naz added a commit that referenced this issue May 3, 2019
closes #123

- As described in docs (https://docs.ghost.org/api/handlebars-themes/helpers/foreach/) it is highly encouraged to use {{#foreach}} helper instead of native handlebar's {{#each}}
- Added it as a part deprecation errors set because it's not really a template compilation error and just a helper use waning which fits better with deprecations group
- Error language used almost identical to the one in docs adjusted to how other rules are worded
naz added a commit to TryGhost/Casper that referenced this issue May 7, 2019
refs TryGhost/gscan#123

- As documentation says (https://docs.ghost.org/api/handlebars-themes/helpers/foreach/)  {{foreach}} should always be used instead of native {{each}} helper
- Deprecation warning was implemented in gscan and  will prompt when uploading the theme
QzSG added a commit to QzSG/Casper that referenced this issue Oct 24, 2019
* Fixed incorrect image aspect ratio when images have width/height attrs

no issue
- when large images have width/height attributes but the image is constrained to it's container or `max-width` style the aspect ratio would be broken because browsers use the `height` attribute value even though the width is smaller

* Rebuild CSS

* ✨Added Koenig gallery card support (TryGhost#475)

no issue

- Update CSS and JS for new gallery card
- Updates CSS to support new gallery card
- Adds JS to support grid layout for gallery view
- Fix gallery breakout size
- Refining styles for gallery card

* Upgrading Casper to 2.6.0

* Restructure spacings for generic figure element

* Upgrading Casper to 2.6.1

* 🐛 Fixed word-wrap for extra long anchor links text (TryGhost#478)

refs TryGhost#466

Anchor links didn't break, when the text was too long. Using `word-break: break-all` specifically on a-tags in post-content fixes this without screwing up other tags and their breaks.

* Upgrading Casper to 2.6.2

* Adjusting spaces for galleries and wide images in a sequence (TryGhost#480)

* Upgrading Casper to 2.6.3

* [Fix] Inline <code> tag word-break inside a <p> tag (TryGhost#483)

* Remove css rule that stops syntax highlighting  (TryGhost#484)

* Remove suspect css rule

Removed the ".post-full-content pre code * { color: inherit }" rule which prevents highlight.js from working.

* Changed to just exclude span

Less disruptive to just remove span from color inheritance.

* Remove extra newline

* Link to required dependencies

Refs TryGhost#468

* Minified javascript in zip(TryGhost#476)

no issue

* Added js minification step to gulp zip script

* Upgrading Casper to 2.6.4

* Add titles to icon links

* Minified js (TryGhost#485)

no issue

- Added a `js` task to run on the gulp build process and minifies our js files
- Changed the required scripts in `default.hbs` to use the minified js files in `/built/`
- Moved existing `js` tasks from `zip` task

* Remove double slash in link

no issue

* Upgrading Casper to 2.7.0

* 🎨 Optimised infinite scroll (TryGhost#503)

no issue
- removed jQuery usage
- use the `<link rel="next">` tag provided by Ghost to determine the next page to fetch

* Upgrading Casper to 2.7.1

no issue

* Responsive images (TryGhost#505)

* Upgrading Casper to 2.8.0

* 2019

* Upgrading Casper to 2.8.1

* Bumped default Ghost API version to v2

no issue

- This change is due to Content API becoming stable https://github.com/TryGhost/Ghost/releases/tag/2.10.0

* Migrated from @blog -> @site

no issue

- This rename is due to new {{@site}} alias introduced in Ghost (TryGhost/Ghost@dd1cf5f) as {{@blog}} variable is deprecated now, and will be removed in v3

* Update no-image classes

Closes TryGhost#513

* Upgrading Casper to 2.9.0

* Use a larger logo size (TryGhost#520)

* Updated gulp to handle errors for every stream (TryGhost#500)

no-issue

Previously we only added an error handler to the first stream in each
pipeline, this meant that if another stream errors you would get
unhelpful error handlers.

* Added missing closing brackets in partials/header.hbs styles (TryGhost#521)

* Upgrading Casper to 2.9.1

* Updated .travis.yml to use Node v10

no issue

- see TryGhost/Ghost@99c3338#diff-354f30a63fb0907d4ad57269548329e3
- see https://docs.ghost.org/faq/node-versions/

* Added "yarn ship" command

no issue

- @todo: add the ability to draft a release when running `yarn ship`

* Upgrading Casper to 2.9.2

* Fix bug with embeds overflowing content width

* v2.9.3

* Add renovate.json

* Update renovate.json

* Pin dependencies

* Update renovate.json

- group CSS dependencies together

* 🐛 Fixed author cover images not displaying

closes TryGhost#542
- user model has `cover_image` property rather than `feature_image`

* Update Renovate Configuration

- make PR names make more sense

* Update dependency gscan to v2.2.1

* Update gulp

* Update css processors

* Update css processors

* Update gulp

* Re-written gulpfile for gulp 4

- use the new, simpler format
- sourcemap and watch support is built in, so these plugins can be removed
- remove js filter - not sure what that did :/
- simplified task structure

* Updated all built assets

- many dependencies have changed, need to rebuild

* 🛠 Always build before test, test before ship

- Make sure we update our build files before running tests
- This also ensures they get updated before shipping

* Update dependency gscan to v2.3.0

* Regenerate yarn.lock

- results in clean lodash versions
- needed due to lodash security vuln

* Update Renovate Configuration

- schedule renovate for early monday mornings

* Upgrading Casper to 2.9.4

* 🐛 Fixed incorrect/missing colours for various elements

closes TryGhost#548
- the recent postcss upgrade resulted in real CSS variables being output with a fallback mechanism, unfortunately this broke a number of colors throughout the theme
- disabled the fallback mechanism to revert back to the previous behaviour

* v2.9.5

* Gulpfile ES6

no issue

- ES6

* Extended `yarn ship`: more automation

no issue

- added gulp task to extend casper release automation
- will draft the release for you
- will get the user facing commits from changelog
- runs after `yarn ship` (postship)
- full automation with env variables is possible

* Added .yarnrc

no issue

- Casper uses `%s` tag naming
- Let's keep this, otherwise release order is broken
- Ghost & Ghost-Admin use this notation too
- It will tell `yarn version` to use `%s` instead of `v%s`

* Update dependency autoprefixer to v9.5.0 (TryGhost#553)

* Update dependency @tryghost/release-utils to v0.3.1

* 2.9.6

* Fixed deprecated {{lang}} helper usage

no issue

- {{lang}} helper was deprecated in favor of {{@site.lang}} with TryGhost/gscan@73e0082

* 2.9.7

* Update Renovate Configuration


Updates the base configuration to include:
- node support policy
- lockfile maintenance
- optimistic automerging

* Added SECURITY.md file

- Consistent with other public repos
- Points at our docs on how to report security issues

* Updated .travis.yml file

- ran slimer fix travis to get latest settings

* 2.9.8

* Update css processors

* Update dependency gscan to v2.4.0

* Update dependency @tryghost/release-utils to v0.3.2

* Lock file maintenance

* 2.9.9

* Update dependency gscan to v2.4.1

* Lock file maintenance

* Added livereload for .hbs files

* 2.9.10

* Updated .travis.yml file

- most up-to-date version of our config

* Update Renovate Configuration

- Use the new shared configuration
- This is a special config for themes which is scheduled monthly, not weekly.

* Updated travis.yml file

* 2.9.11

* Update dependency gscan to v2.5.1

* Update dependency gulp to v4.0.1

* Re-build CSS using latest dependencies (TryGhost#573)

no issue

- CSS preprocessor dependencies have been updated, this re-builds the CSS to match the latest processed output
  - the primary change is the addition of the `::-moz-selection` vendor prefix

* Lock file maintenance (TryGhost#572)

* ✨ Added support for code cards with captions (TryGhost#575)

refs TryGhost/Ghost#10719

- adds styling for `.kg-code-card` so that code blocks are styled the same no matter if they are top-level or inside of a `<figure>` element

* 2.10.0

* Substituted deprecated {{each}} helper with recommended {{foreach}}

refs TryGhost/gscan#123

- As documentation says (https://docs.ghost.org/api/handlebars-themes/helpers/foreach/)  {{foreach}} should always be used instead of native {{each}} helper
- Deprecation warning was implemented in gscan and  will prompt when uploading the theme

* 2.10.1

* Update dependency gscan to v2.6.0

* Update dependency gulp to v4.0.2

* 2.10.2

* Update dependency gscan to v2.6.2

* Update dependency autoprefixer to v9.6.0

* 2.10.3

* Updated links to docs site

* 2.10.4

* 🔗 Updated docs link to be version-less

* Better contrast for selected text inside `pre code` blocks

* 2.10.5

* Update CSS preprocessors

* Update dependency gscan to v2.7.0

* 2.10.6

* Improve gulp globbing (TryGhost#598)

* Remove unused conditional

Closes TryGhost#593

* 2.10.7

* ✨ Added bookmark card CSS (TryGhost#607)

refs TryGhost/Admin@9bfd340 and TryGhost/Ghost@c2aa620

Adds css for styling new bookmark card which generates following html -
  ```html
  <figure class="kg-card kg-bookmark-card">
    <a href="[URL]" class="kg-bookmark-container">
      <div class="kg-bookmark-content">
        <div class="kg-bookmark-title">[TITLE]</div>
        <div class="kg-bookmark-description">[DESCRIPTION]</div>
        <div class="kg-bookmark-metadata">
          <img src="[ICON]" class="kg-bookmark-icon">
          <span class="kg-bookmark-author">[AUTHOR]</span>
          <span class="kg-bookmark-publisher">[PUBLISHER]</span>
        </div>
      </div>
      <div class="kg-bookmark-thumbnail">
        <img src="[THUMBNAIL]">
      </div>
    </a>
  </figure>
  ```

* 2.11.0

* Added max length for bookmark card publisher field (TryGhost#608)

no issue

- fixed style for bookmark cards with too long publisher field

* 2.11.1

* Update dependency gscan to v2.9.0

* Update dependency gulp-livereload to v4.0.2

* 2.11.2

* Added deploy ghost theme github action

- see https://github.com/marketplace/actions/deploy-ghost-theme
- use the new deploy theme github action to automatically deploy master to a test site

* Automatically deploy theme on master only

- switch from all branches to master only

* Updated current version and previous version logic (TryGhost#554)

no issue

- Use current version from `package.json` instead of `npm_package_version` env variable
- Use `release.tag_name` instead of `release.name` for previous version

* Updated jQuery to 3.4.1 to avoid known vulnerabilities (TryGhost#590)

no issue

https://snyk.io/vuln/npm:jquery?lh=3.2.1&utm_source=lighthouse&utm_medium=ref&utm_campaign=audit

* Fixed code cards with long lines from being too wide

no issue

Credit to https://github.com/mvasilkov for the fix -  TryGhost#602

* Bumped Gscan and made rule check explicit to v2 set (TryGhost#622)

* Bumped gscan to v3.0.0

* Added explicit v2 version check for gscan command

* Update dependency postcss-custom-properties to v9 (TryGhost#592)

* Updated Build Tools (TryGhost#571)

* Concatenated all JS into a single file (TryGhost#624)

no issue

- moved large inline JS from templates into separate JS files
  - floating header
  - gallery card support
- use `gulp-concat` to concatenate all JS files into a single `built/casper.js` file
- reduces external JS file requests from 3 (jquery, infinite-scroll.js, jquery.fitvids.js) down to 2 (jquery, casper.js) and reduces page size by removing repeated inline code

* Fixed deprecated autoprefixer config warning when running build tasks

no issue

Passing browser options directly into `autoprefixer()` has been deprecated in favour of general browserslist configuration in `package.json` or a `.browserslistrc` config file

- moved autoprefixer browsers list into `browserslist` config in `package.json`
- updated `autoprefixer` version

* V3 (TryGhost#626)

* Changed {{code}} to {{statusCode}}

refs TryGhost/gscan@2ebd9fe

- {{code}} use has been deprecated in canary rule set of gscan

* V3 Update

* Update package and readme for 3.0

* Improve install instructions

* Update to support browserlist

* Upgrade dependencies

* Fix misnamed property

* V3 darkmode (TryGhost#619)

Added dark mode styles

* Casper final  refinements batch 1

* Casper final  refinements batch 2

* Fixed bookmark card hover bug

* Fixed header social links

* Updated screenshots

* Updated readme

no issue

- refreshed screenshot

* Udpate screenshot in readme

no issue

* 3.0.0-beta.2

* Fixed cut header for post cards

no issue

* 3.0.0-beta.3

* 3.0.0-beta.4

* Updated current version and previous version logic (TryGhost#554)

no issue

- Use current version from `package.json` instead of `npm_package_version` env variable
- Use `release.tag_name` instead of `release.name` for previous version

* Updated jQuery to 3.4.1 to avoid known vulnerabilities (TryGhost#590)

no issue

https://snyk.io/vuln/npm:jquery?lh=3.2.1&utm_source=lighthouse&utm_medium=ref&utm_campaign=audit

* Fixed code cards with long lines from being too wide

no issue

Credits - TryGhost#602

* Bumped gscan version to v3.0.0 (TryGhost#621)

* Bumped gscan to v3.0.0

- This also fixes failing CI builds because the default rules that are being checked were for v2

* Added explicit version check for gscan command

* Added member subscription support (TryGhost#623)

* Added member subscription support

no issue

* Added member subscription success message

no issue

* Added member subscription overlay

* Refined members subscription overlay

* Deleted unused website icon

* Ran CSSComb

* Updated built assets

* 3.0.0-beta.5

* Updated built assets for v3

no issue

* 3.0.0-beta.6

* Remove unused partial

* V3 cleanup (TryGhost#625)

* Removed unused infinity icon

* Removed unused location icon

* Removed unused 'point' icon

* Removed unused Ghost logo icon

* Removed unused author partials

* Cleaned up index log

* Fixed responsive feature image sizes for page template

* 3.0.0-beta.7

* Fixed duplicate browserslist config (TryGhost#628)

no issue

- removes duplicate `browserslist` key from `package.json`

* Updated built CSS (TryGhost#627)

no issue

- ran `gulp` to rebuild the CSS after the v3 merge

* Fixed sticky title and author hover JS (TryGhost#629)

no issue

- replaces author hover JS that was lost during merge
- replaces `floating-header.js` with `sticky-nav-title.js` containing the relevant JS that was lost during merge with a cleanup for unused variables and unnecessary event listeners
- removes reference to non-existent `{{> floating-header}}` partial

* 3.0.0-beta.8

* Update deploy-theme.yml

- bump action version
- add a custom theme name

* 3.0.0

* Update package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants