Skip to content

Add notecard name to tempfile created for editing notecard externally - #5291

Merged
marchcat merged 2 commits into
secondlife:project/lua_editorfrom
WolfGangS:wolfgang/lua_editor_external_notecard_name
Jan 20, 2026
Merged

Add notecard name to tempfile created for editing notecard externally#5291
marchcat merged 2 commits into
secondlife:project/lua_editorfrom
WolfGangS:wolfgang/lua_editor_external_notecard_name

Conversation

@WolfGangS

Copy link
Copy Markdown
Contributor

Description

Add the name of the notecard to the temp file created when editing a notecard externally, matching the implementation for external script editing, and allowing better editing of notecards with the sl-vscode-plugin

Checklist

Please ensure the following before requesting review:

  • I have provided a clear title and detailed description for this pull request.
  • If useful, I have included media such as screenshots and video to show off my changes.
  • The PR is linked to a relevant issue with sufficient context.
  • I have tested the changes locally and verified they work as intended.
  • All new and existing tests pass.
  • Code follows the project's style guidelines.
  • Documentation has been updated if needed.
  • Any dependent changes have been merged and published in downstream modules
  • I have reviewed the contributing guidelines.

Additional Notes

I reused the logic from llpreviewscript for stripping special characters, and for where the viewer tries to create the file with the name of the asset, then if that fails it attempts again without the name, (usually due to path length constraints on windows).

Signed-off-by: WolfGangS <flamin2k8@gmail.com>
@github-actions github-actions Bot added the c/cpp label Jan 17, 2026

@marchcat marchcat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the contribution!

@marchcat
marchcat requested a review from Rider-Linden January 19, 2026 01:22
@akleshchev

Copy link
Copy Markdown
Contributor

@marchcat are there any editor tickets this can be attached to in lua branch or does it need a new one?

@marchcat

Copy link
Copy Markdown
Contributor

Created #5297 for tracking.

@Rider-Linden Rider-Linden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Thank you!
Just the one C++ism and I'm not sure where what the viewer standard is, so not a blocker.

}

std::string LLPreviewNotecard::getTmpFileName()
std::string LLPreviewNotecard::getTmpFileName(const std::string& note_name) const

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this applies to viewer development, but, on the server side, we've been passing std::string_view instead of const std::string &...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are still using const references in most places.

@akleshchev

Copy link
Copy Markdown
Contributor

There appears to be a conflict that prevents a merge.

@marchcat
marchcat merged commit 9391458 into secondlife:project/lua_editor Jan 20, 2026
12 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate #5291 Add notecard name to tempfile created for editing notecard externally

4 participants