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: [FC-0044] group configurations MFE page #929

Conversation

ruzniaievdm
Copy link
Contributor

@ruzniaievdm ruzniaievdm commented Mar 31, 2024

Settings

EDX_PLATFORM_REPOSITORY: https://github.com/raccoongang/edx-platform.git
EDX_PLATFORM_VERSION: ts-develop
TUTOR_GROVE_WAFFLE_FLAGS:
  - name: contentstore.new_studio_mfe.use_new_group_configurations_page
    everyone: true

Issue (figma url contains)

openedx/platform-roadmap#318

Learn about group configurations:

Testing instructions

  1. Run master devstack.
  2. Start platform make dev.up.lms+cms + frontend-app-course-authoring and make checkout on this branch.
  3. Enable the new Group Configurations page by adding a waffle flag contentstore.new_studio_mfe.use_new_group_configurations_page in the CMS admin panel.
  4. Go to the Group Configurations page.

Demo

Content Group

Screen.Recording.Content.Group.mov

Enrollment Track group

Screen.Recording.Enrollment.Track.Group.mov

Experiment configurations

Screen.Recording.Experiment.Configurations.mov

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 31, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Mar 31, 2024

Thanks for the pull request, @ruzniaievdm! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/group-configurations-feature branch from 5afea18 to 9d30839 Compare April 1, 2024 09:53
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 91.97652% with 41 lines in your changes are missing coverage. Please review.

Project coverage is 92.01%. Comparing base (7f3164b) to head (bd8e686).
Report is 13 commits behind head on master.

❗ Current head bd8e686 differs from pull request most recent head 1b7a9c4. Consider uploading reports for the commit 1b7a9c4 to get more accurate results

Files Patch % Lines
src/group-configurations/data/thunk.js 84.21% 12 Missing ⚠️
...ations/content-groups-section/ContentGroupCard.jsx 79.41% 5 Missing and 2 partials ⚠️
...periment-configurations-section/ExperimentCard.jsx 84.61% 5 Missing and 1 partial ⚠️
...up-configurations/content-groups-section/index.jsx 79.16% 5 Missing ⚠️
...periment-configurations-section/ExperimentForm.jsx 92.00% 2 Missing ⚠️
...nt-configurations-section/ExperimentFormGroups.jsx 88.88% 2 Missing ⚠️
...ations/experiment-configurations-section/index.jsx 89.47% 2 Missing ⚠️
src/hooks.js 60.00% 2 Missing ⚠️
src/group-configurations/data/api.js 96.55% 1 Missing ⚠️
src/group-configurations/data/slice.js 97.14% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@           Coverage Diff            @@
##           master     #929    +/-   ##
========================================
  Coverage   92.00%   92.01%            
========================================
  Files         612      645    +33     
  Lines       10745    11255   +510     
  Branches     2304     2431   +127     
========================================
+ Hits         9886    10356   +470     
- Misses        830      867    +37     
- Partials       29       32     +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/group-configurations-feature branch 3 times, most recently from 2652b60 to 5da4665 Compare April 3, 2024 07:38
@ruzniaievdm ruzniaievdm marked this pull request as ready for review April 4, 2024 13:15
@ruzniaievdm ruzniaievdm requested a review from a team as a code owner April 4, 2024 13:15
ruzniaievdm and others added 6 commits April 5, 2024 12:11
* feat: [AXIMST-63] Index group configurations page

* fix: resolve discussions

* fix: resolve second round discussions
* feat: [AXIMST-75, AXIMST-69, AXIMST-81] Content group actions

* fix: resolve conversations
* feat: [AXIMST-87] group-configuration page sidebar

* refactor: [AXIMST-87] add changes after review

* refactor: [AXIMST-87] add changes after review

* refactor: [AXIMST-87] add changes ater review

---------

Co-authored-by: Kyrylo Hudym-Levkovych <[email protected]>
* feat: [AXIMST-93, 99, 105] Group configuration - Experiment Groups

* fix: [AXIMST-518, 537] Group configuration - resolve bugs

* fix: review discussions

* fix: revert classname case
fix: [AXIMST-714] icon is aligned with text (#210)
@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/group-configurations-feature branch from 1682aac to 111917b Compare April 5, 2024 09:11
@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/group-configurations-feature branch from 66fd541 to ae15f69 Compare April 5, 2024 16:29
@PKulkoRaccoonGang PKulkoRaccoonGang added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Apr 7, 2024
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Comment on lines 89 to 111
{isEditMode && (
<OverlayTrigger
overlay={(
<Tooltip
id={`delete-restriction-tooltip-${values.newGroupName}`}
>
{formatMessage(
isUsedInLocation
? messages.deleteRestriction
: messages.deleteButton,
)}
</Tooltip>
)}
>
<Button
disabled={isUsedInLocation}
variant="outline-primary"
onClick={onDeleteClick}
>
{formatMessage(messages.deleteButton)}
</Button>
</OverlayTrigger>
)}
Copy link
Member

Choose a reason for hiding this comment

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

Remove, the delete option should only be shown in the non-edit mode

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem, will be removed
Do we need to apply the same logic for the experiment configurations container?

Comment on lines 14 to 23
containsGroups: {
id: 'course-authoring.group-configurations.container.contains-groups',
defaultMessage: 'Contains {len} groups',
description: 'Message indicating the number of groups contained within a container.',
},
containsGroup: {
id: 'course-authoring.group-configurations.container.contains-group',
defaultMessage: 'Contains 1 group',
description: 'Message indicating that there is only one group contained within a container.',
},
Copy link
Member

Choose a reason for hiding this comment

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

These can be combined into one message

Suggested change
containsGroups: {
id: 'course-authoring.group-configurations.container.contains-groups',
defaultMessage: 'Contains {len} groups',
description: 'Message indicating the number of groups contained within a container.',
},
containsGroup: {
id: 'course-authoring.group-configurations.container.contains-group',
defaultMessage: 'Contains 1 group',
description: 'Message indicating that there is only one group contained within a container.',
},
containsGroups: {
id: 'course-authoring.group-configurations.container.contains-groups',
defaultMessage: 'Contains {len, plural, one {group} other {groups}}',
description: 'Message indicating the number of groups contained within a container.',
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems we have only two options. There are groups with contains groups and contains group without a counter. Am I understanding this correctly?

Copy link
Member

Choose a reason for hiding this comment

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

This update utilizes the plural function available with intl() based on the value of len. If len equals one, it will use "group". If 'len' equals any other number, it will use "groups". This is a reduces the amount of messages required.

Copy link
Member

Choose a reason for hiding this comment

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

containsGroups: {
    id: 'course-authoring.group-configurations.container.contains-groups',
    defaultMessage: 'Contains {len, plural, one {group} other {groups}}',
    description: 'Message indicating the number of groups contained within a container.',
  },

The defaultMessage should be

containsGroups: {
    id: 'course-authoring.group-configurations.container.contains-groups',
    defaultMessage: 'Contains {len, plural, one {1 group} other {{len} groups}}',
    description: 'Message indicating the number of groups contained within a container.',
  },

Comment on lines 29 to 38
usedInLocations: {
id: 'course-authoring.group-configurations.container.used-in-locations',
defaultMessage: 'Used in {len} locations',
description: 'Message indicating the number of locations where the group configurations are used.',
},
usedInLocation: {
id: 'course-authoring.group-configurations.container.used-in-location',
defaultMessage: 'Used in 1 location',
description: 'Message indicating that the group configurations are used in only one location.',
},
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
usedInLocations: {
id: 'course-authoring.group-configurations.container.used-in-locations',
defaultMessage: 'Used in {len} locations',
description: 'Message indicating the number of locations where the group configurations are used.',
},
usedInLocation: {
id: 'course-authoring.group-configurations.container.used-in-location',
defaultMessage: 'Used in 1 location',
description: 'Message indicating that the group configurations are used in only one location.',
},
usedInLocations: {
id: 'course-authoring.group-configurations.container.used-in-locations',
defaultMessage: 'Used in {len, plural, one {location} other {locations}',
description: 'Message indicating the number of locations where the group configurations are used.',
},

Copy link
Member

Choose a reason for hiding this comment

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

usedInLocations: {
    id: 'course-authoring.group-configurations.container.used-in-locations',
    defaultMessage: 'Used in {len, plural, one {location} other {locations}',
    description: 'Message indicating the number of locations where the group configurations are used.'
},

The defaultMessage should be

usedInLocations: {
    id: 'course-authoring.group-configurations.container.used-in-locations',
    defaultMessage: 'Used in {len, plural, one {1 location} other {{len} locations}',
    description: 'Message indicating the number of locations where the group configurations are used.'
},

Copy link
Member

Choose a reason for hiding this comment

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

Will you add a test that checks the experimental title and button render as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean update according to the changes above? Or do you want to cover this functionality because the tests are already added here ExperimentCard.test.jsx

Copy link
Member

Choose a reason for hiding this comment

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

I missed that. You can ignore this comment.

@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/group-configurations-feature branch from 0b72443 to 1b7a9c4 Compare April 15, 2024 08:51
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@ruzniaievdm ruzniaievdm requested a review from KristinAoki April 15, 2024 09:23
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@KristinAoki KristinAoki merged commit 907ce50 into openedx:master Apr 23, 2024
4 checks passed
@openedx-webhooks
Copy link

@ruzniaievdm 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-sandbox open-craft-grove should create a sandbox environment from this PR open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants