-
Notifications
You must be signed in to change notification settings - Fork 52
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: Ket2 surface chemistry #2230
base: main
Are you sure you want to change the base?
Conversation
…t/chemotion_ELN into ketcher-surface-chemistry
…t/chemotion_ELN into ketcher-surface-chemistry
@@ -20,6 +20,10 @@ def scrub_svg(fragment, encoding: nil) | |||
def base_scrub_ml(fragment, type: :xml, encoding: nil) | |||
result = encoding ? fragment.encode(encoding) : fragment | |||
|
|||
# Allow the <image> tag and all its attributes | |||
scrubber = Loofah::Scrubber.new do |node| | |||
node['src'] = node['src'] if node.name == 'image' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/SelfAssignment: Self-assignment detected.
when /chemdraw/i | ||
Chemotion::ChemdrawSvgProcessor.new(svg) | ||
when /ketcher/i | ||
Ketcherails::SVGProcessor.new(svg) | ||
else | ||
Chemotion::OpenBabelSvgProcessor.new(svg) | ||
end | ||
|
||
editor === 'ketcher2' && is_centered = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/CaseEquality: Avoid the use of the case equality operator ===
.
when /chemdraw/i | ||
Chemotion::ChemdrawSvgProcessor.new(svg) | ||
when /ketcher/i | ||
Ketcherails::SVGProcessor.new(svg) | ||
else | ||
Chemotion::OpenBabelSvgProcessor.new(svg) | ||
end | ||
|
||
editor === 'ketcher2' && is_centered = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/ShadowedArgument: Argument is_centered
was shadowed by a local variable before it was used.
ada46b4
to
68e2891
Compare
PR resolves: Issue#166.
Demo:
1- Basic Usage image template
k2SC.image.template.usage.mp4
2- Molfile compatibility with Ketcherrails and ketcher2
k2SC.-.Rails.and.ketcher2.compatibility.mp4
3- Modify image templates with new user templates
k2SC.-.use.template.with.image.templates.1.mp4
4- Redo and Undo features
redo.and.undo.feature.1.mp4
5- Erase Del will not work on image templates else should act same for other atoms/mols
erase.del.feature.k2sc.1.mp4
rather 1-story 1-commit than sub-atomic commits
commit title is meaningful => git history search
commit description is helpful => helps the reviewer to understand the changes
code is up-to-date with the latest developments of the target branch (rebased to it or whatever) => ⏩-merge for linear history is favoured
added code is linted
tests are passing (at least locally): we still have some random test failure on CI. thinking of asking spec/examples.txt to be commited
in case the changes are visible to the end-user, video or screenshots should be added to the PR => helps with user testing
testing coverage improvement is improved.
CHANGELOG : add a bullet point on top (optional: reference to github issue/PR )
parallele PR for documentation on docusaurus if the feature/fix is tagged for a release