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

3418 available plugins #3620

Closed
wants to merge 10 commits into from

Conversation

cakekoa
Copy link
Contributor

@cakekoa cakekoa commented Aug 25, 2023

What does this PR do?

Fixes part of #3418.

Populates the Available Plugins table, and allows plugins to be installed.

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?
  • Do all unit tests pass?
  • Do all end-to-end tests pass?
  • Any other testing performed?

    Tested by running the Island locally and installing plugins

  • If applicable, add screenshots or log transcripts of the feature working
    Screen.Recording.2023-08-25.at.3.29.02.PM.mov

Comment on lines 29 to 42
* makeAvailablePluginsIterator() {
for (const plugin_type in this.availablePlugins) {
for (const plugin_name in this.availablePlugins[plugin_type]) {
if (!this.pluginInstalled(plugin_type, plugin_name)) {
// There may be multiple versions of the same plugin, so we only want the latest one
yield this.availablePlugins[plugin_type][plugin_name].slice(-1)[0];
}
}
}
}

[Symbol.iterator]() {
return this.makeAvailablePluginsIterator();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is object-oriented approach in an otherwise functional code. We can transform the data if we need a list, but creating our own collection that's sometimes object sometimes list complicates usage

@VakarisZ
Copy link
Contributor

Don't push directly into 3418-available-plugins, now the filter branch is stuck, because I have to circumvent these changes that wasn't even merged

@VakarisZ VakarisZ changed the base branch from 3418-plugins-page to 3418-plugin-installation-screen August 29, 2023 07:00

return (
<Box>
<Row className='grid-tools'>
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use Bootstrap's col/row/button, but use the MUI ones.
Using flex properties on the tools wrapper might do the job.
In case you need a custom stylesheet- I would suggest creating a new module for it.

@@ -0,0 +1,53 @@
import React, {useEffect, useState} from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a PR for that component.
Make sure not to override it before merging.

refreshAvailablePlugins();
}, []);

useEffect(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not do it in the first useEffect?

]
}

const pluginName = row.name;
Copy link
Contributor

Choose a reason for hiding this comment

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

move these declarations to the top of the function.

VakarisZ added a commit that referenced this pull request Aug 29, 2023
@VakarisZ
Copy link
Contributor

This was merged, I don't know why github doesn't pick it the merge commit

@VakarisZ VakarisZ closed this Aug 29, 2023
@VakarisZ VakarisZ deleted the 3418-available-plugins branch September 15, 2023 13:35
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.

3 participants