feat: allow package.json drop on index#67
Open
t128n wants to merge 1 commit into
Open
Conversation
43081j
approved these changes
May 27, 2026
Contributor
43081j
left a comment
There was a problem hiding this comment.
all looks good to me but will also req Paolo to look for sake of checking svelte specifics
Comment on lines
+43
to
+53
| $effect(() => { | ||
| if (page.state.package_json) { | ||
| const result = eval_package_json(page.state.package_json); | ||
| if (result.success) { | ||
| scan_result = result; | ||
| scan_error = ''; | ||
| } else { | ||
| scan_error = result.error; | ||
| } | ||
| } | ||
| }); |
Collaborator
There was a problem hiding this comment.
Reassigning state in an effect is generally considered a malpractice...in this case is probably half fine but I would rather use a $derived here. You can basically move everything here return the value in a $derived.by and then use that value in scan_result and scan_error
Collaborator
|
Also I just saw #74: if we merge that we can simply |
Contributor
Author
Collaborator
|
No worries at all...let's see if we end up somewhere with #74 and then we can eventually update this |
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.
Current Behavior
Dropping
package.jsonon index page of replacements.fyi opens it as normal browser file previewfile handle unfortunately is not visible in screen recording
Feature Behavior
Adding
handle_dragoverandhandle_dropevent listeners to index to redirect withpackage.jsondata to /package-json on file dropfile handle unfortunately is not visible in screen recording