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

2698 plugin selector UI schema #2822

Merged
merged 3 commits into from
Jan 11, 2023
Merged

Conversation

VakarisZ
Copy link
Contributor

@VakarisZ VakarisZ commented Jan 11, 2023

What does this PR do?

Fixes part of #2698

image

Add any further explanations here.

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by running the UI, seeing the template component, verifying it gets the expected schema

  • If applicable, add screenshots or log transcripts of the feature working

@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Base: 64.47% // Head: 64.47% // No change to project coverage 👍

Coverage data is based on head (94cfc2c) compared to base (2fcbc4c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2822   +/-   ##
========================================
  Coverage    64.47%   64.47%           
========================================
  Files          411      411           
  Lines        11698    11698           
========================================
  Hits          7542     7542           
  Misses        4156     4156           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.


function getPluginDisplay(plugin, allPlugins){
let selectedPlugin = allPlugins.filter((pluginInArray) => pluginInArray.name == plugin)
if(selectedPlugin.length === 1){
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's probably impossible for this to be a length other than 0 or 1, but we can code a bit more defensively:

Suggested change
if(selectedPlugin.length === 1){
if(selectedPlugin.length > 0){

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'm not sure how much of this code will remain, let's re-consider this once the plugin selector is more fleshed-out

Back end schema contains exploiter plugins, but everything else is missing descriptions etc. Front end has the schema defined well, but it's hard-coded so it can't know what plugins will be added. Until #2750 is resolved merge the schemas
@mssalvatore mssalvatore force-pushed the 2698-plugin-selector-UI-schema branch from 94cfc2c to 50889ea Compare January 11, 2023 14:29
@mssalvatore mssalvatore merged commit c0d5fbd into develop Jan 11, 2023
@mssalvatore mssalvatore deleted the 2698-plugin-selector-UI-schema branch January 11, 2023 14:29
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.

2 participants