Repository navigation
Add GitLab snippet provider support - #681
Merged
Merged
Conversation
| } | ||
| async function textClick (selector, text) { | ||
| await until(() => evaluate(`[...document.querySelectorAll(${JSON.stringify(selector)})].some(e => e.innerText.trim() === ${JSON.stringify(text)})`), `visible control ${text}`) | ||
| const found = await evaluate(`(() => { const el = [...document.querySelectorAll(${JSON.stringify(selector)})].find(e => e.innerText.trim() === ${JSON.stringify(text)}); if (!el) return false; el.click(); return true })()`) |
| } | ||
| async function textClick (selector, text) { | ||
| await until(() => evaluate(`[...document.querySelectorAll(${JSON.stringify(selector)})].some(e => e.innerText.trim() === ${JSON.stringify(text)})`), `visible control ${text}`) | ||
| const found = await evaluate(`(() => { const el = [...document.querySelectorAll(${JSON.stringify(selector)})].find(e => e.innerText.trim() === ${JSON.stringify(text)}); if (!el) return false; el.click(); return true })()`) |
| await pause(100) | ||
| } | ||
| async function input (selector, value, index = 0) { | ||
| await evaluate(`(() => { const el = document.querySelectorAll(${JSON.stringify(selector)})[${index}]; Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set.call(el, ${JSON.stringify(value)}); el.dispatchEvent(new Event('input', { bubbles: true })); el.dispatchEvent(new Event('change', { bubbles: true })); })()`) |
| await pause(100) | ||
| } | ||
| async function input (selector, value, index = 0) { | ||
| await evaluate(`(() => { const el = document.querySelectorAll(${JSON.stringify(selector)})[${index}]; Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set.call(el, ${JSON.stringify(value)}); el.dispatchEvent(new Event('input', { bubbles: true })); el.dispatchEvent(new Event('change', { bubbles: true })); })()`) |
hackjutsu
marked this pull request as ready for review
October 27, 2026 02:26
This was referenced Oct 27, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitLab users cannot manage their snippets in Lepton without moving them to GitHub. This PR lets them organize, search, edit, and sync personal snippets on GitLab.com or self-managed GitLab using a personal access token. Account data stays separate, and login fields accommodate all eight supported languages.
OAuth and project snippets are outside scope. Closes #262, closes #545.
Related: #397 (GitLab support only; offline storage is outside scope), #375 (self-managed GitLab connectivity only; Lepton remains a desktop app).
Validation: Electron E2E passed against local GitLab CE 19.5.1, covering authentication, snippet operations, sync/search, rendering, restart, and recovery. All 356 unit tests, build, lint, and 128 login-layout cases passed. GitLab.com itself and customer-specific configurations remain unverified.
Screenshots: English/French login and live GitLab snippets