Skip to content

fix: enable editing of studyname#1378

Open
NishaSharma14 wants to merge 1 commit intodevelopmentfrom
issue#1377
Open

fix: enable editing of studyname#1378
NishaSharma14 wants to merge 1 commit intodevelopmentfrom
issue#1377

Conversation

@NishaSharma14
Copy link
Copy Markdown
Contributor

@NishaSharma14 NishaSharma14 commented Apr 2, 2026

Screen.Recording.2026-04-02-720p.at.10.30.00.mov

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables inline editing of the selected study’s name on the Upload page, with a small tooltip styling adjustment.

Changes:

  • Add a click-to-edit (contenteditable) study name header with save/cancel behavior in Upload.vue.
  • Track editing state (isEditingStudyName) and a draft value (studyNameDraft) and refresh these during study selection/save.
  • Adjust right-positioned tooltip layout in app.css (inline-flex + nowrap sizing).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
resources/js/Pages/Upload.vue Adds inline study name editing UI/state and wires it into existing study save flow.
resources/css/app.css Tweaks tooltip right-aligned layout to avoid wrapping and size to content.
public/build/manifest.json Updates Vite build manifest (likely generated artifact; see comment).

Comment on lines +1245 to +1253
<span
v-if="
!isEditingStudyName
"
class="cursor-text"
@click="
startEditingStudyName
"
>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The study name becomes editable via a clickable , but it isn’t keyboard-accessible (no tabindex/role) and screen readers won’t get an affordance/label for entering edit mode. Consider using a real button or adding tabindex="0", role="button", and key handlers (Enter/Space) to start editing, plus an aria-label for the contenteditable editor.

Copilot uses AI. Check for mistakes.
range.selectNodeContents(editor);
range.collapse(false);

const selection = window.getSelection();
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

window.getSelection() can return null; calling removeAllRanges() / addRange() unconditionally can throw in some environments (e.g., if selection APIs are unavailable). Add a null-check before using the selection object.

Suggested change
const selection = window.getSelection();
const selection = window.getSelection?.();
if (!selection) {
return;
}

Copilot uses AI. Check for mistakes.

this.studyNameDraft = nextName;
this.studyForm.name = nextName;
this.selectedStudy.name = nextName;
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

This optimistically mutates selectedStudy.name before the save request completes. If the API call fails or validation rejects the name, the header will still show the new value with no rollback. Prefer updating only studyForm.name/draft locally and assigning selectedStudy.name after a successful response (or revert on error).

Suggested change
this.selectedStudy.name = nextName;

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 5
{
"_AccessDialogue-Cateni1h.js": {
"file": "assets/AccessDialogue-Cateni1h.js",
"_AccessDialogue-C1iTx8n8.js": {
"file": "assets/AccessDialogue-C1iTx8n8.js",
"name": "AccessDialogue",
"imports": [
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

public/build is gitignored, so committing an updated Vite manifest can break deployments if the corresponding hashed assets aren’t present (and it also creates noisy diffs). This file should be generated during the build step and typically shouldn’t be changed in PRs—please drop it from the commit (and consider untracking it entirely if possible).

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.56%. Comparing base (acfdbae) to head (0fefc20).

Additional details and impacted files
@@              Coverage Diff               @@
##             development    #1378   +/-   ##
==============================================
  Coverage          71.56%   71.56%           
  Complexity          2435     2435           
==============================================
  Files                210      210           
  Lines               9371     9371           
==============================================
  Hits                6706     6706           
  Misses              2665     2665           
Flag Coverage Δ
unittests 71.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Make the sample name editable in submission step.

2 participants