mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #1896] Generalize changes to lenses renderers #605
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#605
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sguzmanm on GitHub (Oct 24, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1896
Originally assigned to: @RishabhAgarwal-2001 on GitHub.
Is your feature request related to a problem? Please describe.
Mostly maintainability and code readability. When you make a change to any of these renderers you are forced to copy the same code more than three times
Describe the solution you'd like
A global component for rendering the response that receives as inputs:
Describe alternatives you've considered
Additional context

Currently these are the renderers of the repo:
@AndrewBastin commented on GitHub (Oct 25, 2021):
Interesting, we were thinking of abstracting text based renderers actually to a more generalized system but never got around to it.
This is a low priority issue, but PRs are welcome!
@RishabhAgarwal-2001 commented on GitHub (Nov 25, 2021):
Hello!
I was looking to take up the task of refactoring lenses. I am initially planning to create an abstract text-based renderer as per the previous comment.
Can I get this issue assigned to me? @AndrewBastin
@AndrewBastin commented on GitHub (Nov 25, 2021):
@RishabhAgarwal-2001 sure!
But just to make sure you get what I have in mind:
Generally our code is moving to take advantage of Vue 3 Composables and Composition API more along with TypeScript. So abstracting out the lens renderers to a composable we can apply easily.
Second of all, lenses should work for non-text content, for example we have the ImageLensRenderer and maybe in the future we might add other binary formats as well. So, we need to keep support for them.
Anyways, feel free to ping me on Discord or Telegram if you want any help!
Assigning!