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

"Bare Bones" UI for Problem Bank [FC-0062] #35679

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

bradenmacdonald
Copy link
Contributor

@bradenmacdonald bradenmacdonald commented Oct 20, 2024

Description

This implements a minimal UI so that the WIP Problem Bank XBlock is usable:

Problem.Bank.Bare.Bones.Demo.mov

Detailed summary

Supports various cases:

Screenshot 2024-10-21 at 2 58 17 PM

Screenshot 2024-10-21 at 2 58 27 PM

Screenshot 2024-10-21 at 2 58 36 PM

Supporting information

Implements openedx/frontend-app-authoring#1385 . Private ref FAL-3898.

Currently depends on / includes commits from several other PRs:

Testing instructions

See video and try following along on your own devstack.

Deadline

ASAP - need this in Sumac

TODO

Before merging:

  • i18n
  • allow deleting components once added
  • tests? if possible? not sure if we can make reasonable tests for this sort of legacy UI code and it depends on the MFE anyways

In follow-up PRs:

  • refactor the content picker to support multiple selections

@bradenmacdonald bradenmacdonald added the FC Relates to an Axim Funded Contribution project label Oct 20, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @bradenmacdonald!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/wg-maintenance-edx-platform. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U labels Oct 20, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @bradenmacdonald!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/wg-maintenance-edx-platform. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@bradenmacdonald
Copy link
Contributor Author

@@ -320,7 +321,8 @@ def _studio_wrap_xblock(xblock, view, frag, context, display_name_only=False):
'is_selected': context.get('is_selected', False),
'selectable': context.get('selectable', False),
'selected_groups_label': selected_groups_label,
'can_add': context.get('can_add', True),
'can_add': can_add,
'can_delete': can_add or (root_xblock and root_xblock.scope_ids.block_type == "itembank"),
Copy link
Contributor

Choose a reason for hiding this comment

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

[request] Please add a comment explaining this special-casing of itembank behavior.

@@ -475,7 +478,7 @@ def validate(self):
action_label=_("Edit the problem bank configuration."),
)
)
elif len(self.children) < self.max_count:
elif len(self.children) > 0 and len(self.children) < self.max_count:
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit, optional]: You can also do this as elif 0 < len(self.children) < self.max_count

xmodule/item_bank_block.py Outdated Show resolved Hide resolved
if is_root and self.children:
# User has clicked the "View" link. Show a preview of all possible children:
max_count = self.max_count
if max_count < 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit, optional]: The usage of max_count == -1 as "grab all the things" is both frequent and obscure to anyone just glancing at the code for the first time. It might be worth making a constant or a helper or something to make the intent clearer, e.g. if self.max_count == self.SELECT_ALL_CHILDREN or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but gonna leave it for now.

Copy link
Contributor

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

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

Only strongly requested changes are a comment for can_delete and re-applying .location -> .usage_key. Others are optional nits.

@bradenmacdonald
Copy link
Contributor Author

Thanks @ormsbee. Done.

@ormsbee
Copy link
Contributor

ormsbee commented Oct 22, 2024

@bradenmacdonald: Once you've got all the CI passing, could you please squash the commits tonight so @kdmccormick or I can merge first thing in the morning our time?

@bradenmacdonald
Copy link
Contributor Author

@ormsbee Done, should be ready for merge.

@kdmccormick kdmccormick merged commit e0c56aa into openedx:master Oct 23, 2024
49 checks passed
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@bradenmacdonald bradenmacdonald deleted the braden/pool-ui branch October 23, 2024 14:38
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants