Skip to content

feat: support idAliases for PluginSlots #110

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

brian-smith-tcril
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril changed the title feat: support id_aliases for PluginSlots feat: support idAliases for PluginSlots Apr 15, 2025
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.91%. Comparing base (78ddff8) to head (c618f16).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
+ Coverage   95.76%   95.91%   +0.15%     
==========================================
  Files          10       10              
  Lines         236      245       +9     
  Branches       71       75       +4     
==========================================
+ Hits          226      235       +9     
  Misses          9        9              
  Partials        1        1              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@brian-smith-tcril brian-smith-tcril force-pushed the id-aliases branch 3 times, most recently from 0a3ee4e to 100128d Compare April 15, 2025 14:59
}
return { keepDefault: true, plugins: [] };

const configSlots = allConfigSlots[lastMatchingId];
Copy link
Member

Choose a reason for hiding this comment

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

Nit/question: Would this be better named as configSlot rather than the plural? Since we are only expecting the configuration for one slot?

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, I was just using the name that already existed before (it was always just getting 1), and I wasn't sure if there was a specific reason for or context around the name being plural before that I was missing

Copy link
Member

@MaxFrank13 MaxFrank13 Apr 15, 2025

Choose a reason for hiding this comment

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

Ahh I see! Well I have no issues with the code so I have given my approval, but I think the singular makes more sense. Although I realize I don't have write access to this repo anymore so my approval is just for aesthetic purposes I suppose 😆

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 sounds like the naming being plural likely wasn't intentional in the first place, so I've updated it to be configSlot instead of configSlots (https://github.com/openedx/frontend-plugin-framework/compare/100128dd9840106b7028feb88d6559432d3f120b..2360fc186923e027aa3479dd31289476dd731005)

Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

Works for me, thanks!

// When defining a JS object with multiple entries
// that have the same key, only the last one is kept
//
// We want to treat all entries in the pluginSlots object
Copy link
Member

Choose a reason for hiding this comment

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

nit: what is "the pluginSlots object" referring to specifically? allConfigSlots?

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 think the line break made this less clear than it should be, it's "the pluginSlots object in env.config.jsx"

@brian-smith-tcril brian-smith-tcril merged commit 1fc6aa8 into openedx:master Apr 16, 2025
6 checks passed
@openedx-semantic-release-bot

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple ids for plugin slots
5 participants