Skip to content

Conversation

Toxantron
Copy link
Member

@Toxantron Toxantron commented Oct 5, 2025

The module was introduced as part of the business and licensing model. Dropping it actually simplifies the endpoint.

@Toxantron Toxantron self-assigned this Oct 5, 2025
@Toxantron
Copy link
Member Author

Still need to fix the tests.

@dbeuchler
Copy link
Member

Nice – definitely one of the most unnecessary modules we've ever had 👍

Could we also harmonize the Namespaces VisualInstructions vs. WorkerSupport?

Copy link
Member

@dbeuchler dbeuchler left a comment

Choose a reason for hiding this comment

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

What do you think about bringing back a WorkerSupport as a resource which is a wrapper around all VisualInsturctors - this could also do the content-replacement

Comment on lines 130 to 124
public void AddInstruction(string identifier, InstructionModel instruction)
{
_workerSupport.AddInstruction(identifier, Converter.FromModel(instruction));
}
var instructor = _resourceMgmt.GetResource<IVisualInstructionSource>(identifier);
Copy link
Member

Choose a reason for hiding this comment

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

What was the idea behind adding instructions from the endpoint?

Comment on lines -30 to -42
var content = item.Content;
var preview = item.Preview;

// Apply content pattern
if (!string.IsNullOrEmpty(_config.ContentReplacement))
{
// Fill content with content regex
if (_contentRegex != null && !string.IsNullOrEmpty(item.Content))
item.Content = _contentRegex.Replace(content, _config.ContentReplacement);
// If replacement was configured but no regex, we apply the preview regex
else if (_previewRegex != null && !string.IsNullOrEmpty(item.Preview))
item.Content = _previewRegex.Replace(preview, _config.ContentReplacement);
}
Copy link
Member

Choose a reason for hiding this comment

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

You have dropped the support for replacing regex - I don't really know, but was it an unused feature? I remember features like Instruction.Content = "<guid>|Master" which was then replaced by http://server/media/... - maybe we could move that to the VisualInstuctor itself?

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