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(menu/exportCommunication): Allow export of communication section #1044

Merged
merged 9 commits into from
Nov 24, 2022

Conversation

danyill
Copy link
Collaborator

@danyill danyill commented Oct 16, 2022

Closes #1042

This seemed straightforward to me and within my capability, so I thought I might do it.

I only belatedly realised that I had not carefully read the issue and noticed that @ca-d had self-assigned. Feel free to close my PR if this was not what you had in mind or if that's easier, I will not mind in the least 😉

I'm not very sure about the icon or the tests and the name of the extension doesn't quite fit the Menu (should the menu be wider?)

Incidentally, I'm interested in this because I'd like to define (at some point) a custom file format for the communication section to function as an interface for confirming IPAM and to enable building network switch configuration with Communication section information on VLANs and with MAC address filtering for SV traffic. At some stage, I'll raise a separate issue for that. What is missing is "who needs" the GOOSE/SMV traffic.

@danyill danyill requested a review from ca-d October 16, 2022 00:37
@danyill
Copy link
Collaborator Author

danyill commented Oct 17, 2022

@ca-d suggested making this a conformant SCL file by including the SCL root note and the Header element as well. I will add these.

@danyill
Copy link
Collaborator Author

danyill commented Oct 18, 2022

@ca-d suggested making this a conformant SCL file by including the SCL root note and the Header element as well. I will add these.

I have done these, I hope - I will be grateful for a review and happy to make improvements.
I will also want to add some documentation for this plugin for the Help function.

src/menu/ExportCommunication.ts Outdated Show resolved Hide resolved
src/menu/SaveProject.ts Outdated Show resolved Hide resolved
public/js/plugins.js Outdated Show resolved Hide resolved
@ca-d
Copy link
Contributor

ca-d commented Oct 25, 2022

@ca-d suggested ...

I have done these

Thank you, @danyill - great work overall! Regarding the Help, I think it'll be useful to update the wiki, but I'd really like to fix the help viewer (internal links currently do not work) before updating the content again. Currently the built in help viewer is hardly usable to me.

My current favored solution for fixing this bug:

  1. Introduce a build step which compiles the markdown to static HTML files into the distribution directory.
  2. Get rid of the markdown renderer runtime dependency.
  3. Render the static html help statically into an iframe in an editor type plugin using import.meta.url to construct the iframe's original src attribute.
  4. ???
  5. Profit!

Copy link
Contributor

@ca-d ca-d left a comment

Choose a reason for hiding this comment

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

Not all of the comments need to be attended to in this pull request (especially not help viewer bugfixes and a more robust foundation save blob function), but let's discuss them and make extra issues for the ones we want to implement before merging this!

@JakobVogelsang JakobVogelsang changed the title feat(menu/exportCommunication) Allow export of communication section feat(menu/exportCommunication): Allow export of communication section Oct 26, 2022
@danyill
Copy link
Collaborator Author

danyill commented Oct 26, 2022

👍 Thank you both for these review comments, I hope to look at these over the next few days

@danyill
Copy link
Collaborator Author

danyill commented Oct 28, 2022

Regarding the Help, I think it'll be useful to update the wiki, but I'd really like to fix

I have logged #1057

* Change icon
* Revert Save Project to avoid plugin namespace pollution
* Remove functionality test which required function modification
@danyill
Copy link
Collaborator Author

danyill commented Nov 17, 2022 via email

@danyill danyill requested a review from ca-d November 23, 2022 07:57
Copy link
Contributor

@ca-d ca-d left a comment

Choose a reason for hiding this comment

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

LGTM

@danyill
Copy link
Collaborator Author

danyill commented Nov 24, 2022

Thank you ca-d for reviewing this and for providing the tests

@danyill danyill merged commit e4d4e24 into openscd:main Nov 24, 2022
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.

Export Communication Section Plugin
3 participants