Skip to content

Feature: expand context#53

Open
RudolfMan wants to merge 10 commits intohexpm:mainfrom
RudolfMan:expand-context
Open

Feature: expand context#53
RudolfMan wants to merge 10 commits intohexpm:mainfrom
RudolfMan:expand-context

Conversation

@RudolfMan
Copy link
Copy Markdown
Contributor

The ability to expand the context of the code around the change.

There are definitely stuff to improve.. especially in my frontend spaghetti JS (not sure if it makes sense to rewrite Diffs views to live_view since that page isn't meant to be live)

So currently onclick on any button "expanUp" or "expandDown" script tries to read numbers from lines before and after the button and makes the request:
GET /diff/:package/:version/expand/:from_line/:to_line/:right_line?file_name=<file_name>

In the backend we unpack that file from, extract the requested chunk and render the html

To be able to unpack particular file I propose a patch to hex_core to add :hex_tarball.unpack/3 to accept the list of files. see hexpm/hex_core#95

expand_context

Loading
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