Resolve `view_to_component` limitations

Open
#269 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
django, python, react
Domain
frontend

Research direction

Start by tracing the view_to_component entry point named in the issue. The issue lists HTTP-method handling, ReactPy event attachment, and same-domain hyperlink interception as separate limitations, but names no files or tests; done would require defining and implementing the intended iframe-like behavior for these cases.

Written by the indexing model from the issue text.

Description

complexity: 2 (medium) priority: 3 (low)
Current Situation and Proposed Actions

There are currently several limitations of using view_to_component.

  • Requires manual intervention to change HTTP methods to anything other than GET.
    • The initial HTTP request will probably always have to be GET, but it might be reasonable to automatically handle other kinds of HTTP methods depending on what the user clicked on.
    • Realistically, the end goal is to make view_to_component behave as similarly to an iframe as technologically possible.
  • ReactPy events cannot conveniently be attached to converted view HTML.
    • It might make sense to give the user some kind of interface to "query select" certain rendered items, and attach ReactPy event functions to them.
  • Has no option to automatically intercept click events from hyperlinks (such as <a href='example/'></a>).
    • All hyperlinks that point to the current domain should probably be intercepted by ReactPy and rendered via view_to_component.
    • Realistically, the end goal is to make view_to_component behave as similarly to an iframe as technologically possible.
Dominant language
Python
Stars
357
Forks
22
Avg merge
10h 31m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactive-python/reactpy-django

All issues in reactive-python/reactpy-django

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.