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

feat: refactor page interface #345

Merged
merged 8 commits into from Jul 25, 2019
Merged

Conversation

saltysugar
Copy link
Contributor

@saltysugar saltysugar commented Jul 23, 2019

Summary

Closes #332

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI/CSS related code, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

  1. page.attributes.* are now page.* but page.attributes.* will still work until next major version.
  2. page.attributes.injectMarkdownHeadings is now page.markdownHeadings, so that this feature is consistent with page.excerpt.
  3. In saber-plugin-query-posts categories and tags are injected as page.categoriesInfo and page.tagsInfo because page.categories and page.tags are already used in front matter due to the changes made in (1)

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Published PR with canary version:

Canary Versions

  • extract-sfc-blocks@0.0.3-canary.345.d76e516.0
  • create-blog@0.2.8-canary.345.d76e516.0
  • create-site@0.3.2-canary.345.d76e516.0
  • saber-highlight-css@0.0.6-canary.345.d76e516.0
  • saber-highlighter-prism@0.3.2-canary.345.d76e516.0
  • saber-log@0.2.1-canary.345.d76e516.0
  • saber-markdown@0.0.10-canary.345.d76e516.0
  • saber-plugin-feed@0.3.5-canary.345.d76e516.0
  • saber-plugin-git-modification-time@0.0.4-canary.345.d76e516.0
  • saber-plugin-google-analytics@0.0.7-canary.345.d76e516.0
  • saber-plugin-image@0.0.5-canary.345.d76e516.0
  • saber-plugin-meta-redirect@0.0.6-canary.345.d76e516.0
  • saber-plugin-netlify-redirect@0.0.7-canary.345.d76e516.0
  • saber-plugin-prismjs@0.2.2-canary.345.d76e516.0
  • saber-plugin-pwa@0.3.4-canary.345.d76e516.0
  • saber-plugin-query-posts@0.3.3-canary.345.d76e516.0
  • saber-plugin-transformer-html@0.0.6-canary.345.d76e516.0
  • saber-plugin-transformer-pug@0.0.6-canary.345.d76e516.0
  • saber-utils@0.1.6-canary.345.d76e516.0
  • saber@0.6.11-canary.345.d76e516.0

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@netlify
Copy link

netlify bot commented Jul 23, 2019

Deploy preview for saber ready!

Built with commit 32201c7

https://deploy-preview-345--saber.netlify.com

@egoist egoist marked this pull request as ready for review July 24, 2019 06:56
@egoist
Copy link
Collaborator

egoist commented Jul 24, 2019

In saber-plugin-query-posts categories and tags are injected as page.categoriesInfo and page.tagsInfo because page.categories and page.tags are already used in front matter.

This is actually a bad UX 🤔It seems using page.attributes is still better in some extent.

@egoist
Copy link
Collaborator

egoist commented Jul 24, 2019

In saber-plugin-query-posts categories and tags are injected as page.categoriesInfo and page.tagsInfo because page.categories and page.tags are already used in front matter.

Hmm never mind, let's just use this approach for now, when we have #183 implemented we won't have to inject variables like this.

@saltysugar
Copy link
Contributor Author

saltysugar commented Jul 24, 2019

In saber-plugin-query-posts categories and tags are injected as page.categoriesInfo and page.tagsInfo because page.categories and page.tags are already used in front matter.

Yes for now I rename them to page.categoriesInfo and page.tagsInfo, let me know if you have better names.

@egoist
Copy link
Collaborator

egoist commented Jul 24, 2019

If anyone wants to try this PR out, just re-install all your saber-related dependencies from @canary channel.

@egoist egoist changed the title Refactor page interface feat: refactor page interface Jul 24, 2019
@egoist egoist merged commit 629c4a6 into saberland:master Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor the page interface
2 participants