openedx / openedx/frontend-app-authoring

Deprecate additional_course_content_plugin plugin slot

Open
#2,330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
17
Forks
218
Avg merge
9d 20h
Merged PRs (30d)
20

Description

So it sounds like we can simplify this quite a bit!

If we remove this block:
https://github.com/openedx/frontend-app-authoring/blob/11de4022f0ca86f0991c6f4cdcf612497c7a24b8/src/pages-and-resources/PagesAndResources.jsx#L48-L58

and this line
https://github.com/openedx/frontend-app-authoring/blob/11de4022f0ca86f0991c6f4cdcf612497c7a24b8/src/pages-and-resources/PagesAndResources.jsx#L71

and this block
https://github.com/openedx/frontend-app-authoring/blob/11de4022f0ca86f0991c6f4cdcf612497c7a24b8/src/pages-and-resources/PagesAndResources.jsx#L96-L106

then everything should be in the one PageGrid.

We then need to handle the 2 slot id issue. By removing those and making no other changes we'd only be supporting:

  • Site operators using only org.openedx.frontend.authoring.additional_course_plugin.v1/additional_course_plugin

And we need to continue to also support:

  • Site operators using only org.openedx.frontend.authoring.additional_course_content_plugin.v1/additional_course_content_plugin
  • Site operators using both org.openedx.frontend.authoring.additional_course_plugin.v1/additional_course_plugin and org.openedx.frontend.authoring.additional_course_content_plugin.v1/additional_course_content_plugin

I think the best way to handle this would be to update the AdditionalCoursePluginSlot component

https://github.com/openedx/frontend-app-authoring/blob/11de4022f0ca86f0991c6f4cdcf612497c7a24b8/src/plugin-slots/AdditionalCoursePluginSlot/index.tsx#L3-L8

to include the plugin slot from the AdditionalCourseContentPluginSlot component

https://github.com/openedx/frontend-app-authoring/blob/11de4022f0ca86f0991c6f4cdcf612497c7a24b8/src/plugin-slots/AdditionalCourseContentPluginSlot/index.tsx#L4-L7

so we'd have

export const AdditionalCoursePluginSlot = () => (
  <PluginSlot
    id="org.openedx.frontend.authoring.additional_course_plugin.v1"
    idAliases={['additional_course_plugin']}
  />
  <PluginSlot
    id="org.openedx.frontend.authoring.additional_course_content_plugin.v1"
    idAliases={['additional_course_content_plugin']}
  />
);

at that point we can completely remove the AdditionalCourseContentPluginSlot component.

We can then put out a DEPR for the org.openedx.frontend.authoring.additional_course_content_plugin.v1/additional_course_content_plugin id/alias and let site operators know they should move anything they're currently putting in that slot to the org.openedx.frontend.authoring.additional_course_plugin.v1 slot instead.

Originally posted by @brian-smith-tcril in https://github.com/openedx/frontend-app-authoring/issues/2321#issuecomment-3117947497

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/pages-and-resources/PagesAndResources.jsx and inspect the linked blocks and line, then compare src/plugin-slots/AdditionalCoursePluginSlot/index.tsx with AdditionalCourseContentPluginSlot/index.tsx. Done means both slot IDs remain supported through AdditionalCoursePluginSlot, the separate content slot component is removed, and the deprecated slot is no longer rendered separately.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.