Skip to content

Conversation

@BoDonkey
Copy link
Contributor

@BoDonkey BoDonkey commented Oct 4, 2024

Summary

Summarize the changes briefly, including which issue/ticket this resolves. If it closes an existing Github issue, include "Closes #[issue number]"
This PR is in response to a customer complaint that when an area has expanded: true then the max option is no longer respected. The AposAreaMenu.vue component passes both disabled: false and max-reached props. The AposAreaContextualMenu.vue component then sets disabled using both the passed values of disabled and max-reached. The button component, that allows the opening of the expanded widget preview, does not check the value of max-reached, only disabled. This change alters the value of disabled being passed so that the expanded menu respects max-reached. Closes PRO-6621.

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

From the zendesk ticket:
For any given widget whose type is area.

  1. Case1: set the expanded: true and max: 2
  2. Case2: set the expanded: false or better remove expanded field, and max:2
  3. Observe that in case1, max:2 doesn't work, it shouldn't let you add widget after second time.

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:

@BoDonkey BoDonkey requested a review from boutell October 4, 2024 15:32
@linear
Copy link

linear bot commented Oct 4, 2024

@BoDonkey BoDonkey merged commit 8a0c84b into main Oct 4, 2024
8 checks passed
@BoDonkey BoDonkey deleted the max-expanded-widget branch October 4, 2024 18:13
haroun added a commit to haroun/apostrophe that referenced this pull request Oct 9, 2024
* upstream/PRO-4505/modal-priority:
  Modify disabled prop (apostrophecms#4744)
  Fix media manager not handling search results properly (sometimes)
  flex media manager containers
  remove conditional rendering
  lint
  fix line
  wip
  split button focus, widget priority button
  make sure we have modal
  restore focus to last selected item after prop change
  remove logs
  focus considerations for media uploader
  switch promise timeout for nexttick
  retry
  wip
  wip
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.

3 participants