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

warn for page schema conflicts #4798

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

haroun
Copy link
Contributor

@haroun haroun commented Nov 8, 2024

Summary

Summarize the changes briefly, including which issue/ticket this resolves. If it closes an existing Github issue, include "Closes #[issue number]"

What are the specific steps to test this change?

For example:

  1. Run the website and log in as an admin
  2. Open a piece manager modal and select several pieces
  3. Click the "Archive" button on the top left of the manager and confirm that it should proceed
  4. Check that all pieces have been archived properly

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@haroun haroun self-assigned this Nov 8, 2024
for (const right of self.typeChoices) {
const diff = compareSchema(left, right);
if (diff.size) {
self.apos.util.warnDev(`The page type "${left.name}" has a conflict with "${right.name}" (${formatDiff(diff)})`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This may cause errors or other problems when an editor switches page types."

* main:
  changelog (#4802)
  fixes modals deep selectors (#4795)
  fix vue warnings (#4797)
  Pro 6694 breakpoint preview vite ready (#4789)
  Resolve yaml dependency conflicts (#4801)
  PRO-6775: External frontend support, docs cleanup (#4799)
  sort glob result (#4796)
  HMR condition argument and widget player fix (#4794)
  fix permission grid tooltip display (#4792)
  Fix extra bundle detection (#4791)
  release 4.9.0 (#4788)
  Pro 6535 revision (#4787)
@haroun haroun marked this pull request as ready for review November 12, 2024 16:34
@haroun haroun requested a review from boutell November 12, 2024 16:34
CHANGELOG.md Outdated
@@ -17,6 +17,7 @@ did not actually use any noncompliant cookie names or values, so there was no vu
* It's possible now to target the HMR build when registering via `template.append` and `template.prepend`. Use `when: 'hmr:public'` or `when: 'hmr:apos'` that will be evaluated against the current asset `options.hmr` configuration.
* Adds asset module option `options.modulePreloadPolyfill` (default `true`) to allow disabling the polyfill preload for e.g. external front-ends.
* Adds `bundleMarkup` to the data sent to the external front-end, containing all markup for injecting Apostrophe UI in the front-end.
* Warns users when two page types shares the same field name, but has a different type. This may cause errors or other problems when an editor switches page types.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about: "Warns users when two page types have the same field name, but a different field type"

To clarify what the issue is

@haroun haroun requested a review from boutell November 13, 2024 15:45
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.

2 participants