Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF-1626] Allow string fomatting in rx.html component #2155

Closed
abdullahkhalids opened this issue Nov 11, 2023 · 4 comments
Closed

[REF-1626] Allow string fomatting in rx.html component #2155

abdullahkhalids opened this issue Nov 11, 2023 · 4 comments
Labels
bug Something isn't working linear Created by Linear-GitHub Sync
Milestone

Comments

@abdullahkhalids
Copy link

abdullahkhalids commented Nov 11, 2023

Describe the bug
Currently, the rx.html component src is not formatted.

To Reproduce
Compile this app

from rxconfig import config
import reflex as rx

class State(rx.State):
    """The app state."""

    myvar: str = "Blue"


def index() -> rx.Component:
    return rx.fragment(
	rx.heading(
            f"The number is {State.myvar}"
            ), #works as expected
        rx.html(
            f"The number is {State.myvar}"
            ), #doesn't work
    )

app = rx.App()
app.add_page(index)
app.compile()

Expected behavior
The html format string should be processed correctly.

Screenshots

image

Specifics (please complete the following information):

  • Python Version: 3.10.12
  • Reflex Version: 0.3.2
  • OS: Debian testing
  • Browser (Optional):

From SyncLinear.com | REF-1626

@masenf
Copy link
Collaborator

masenf commented Nov 13, 2023

potentially fixed by #2149

@Lendemor Lendemor added the bug Something isn't working label Nov 13, 2023
@ipcloudlive
Copy link

ipcloudlive commented Jan 6, 2024

I am using multiline text like this

return rx.html(
"""
<h1> Hello {State.text1}</h1>
<h1> Bye {State.text2}</h1>
""")

But still cannot able to set the variable inside the html element
Can you plz share guide /docs

@masenf masenf added the linear Created by Linear-GitHub Sync label Jan 8, 2024
@masenf masenf changed the title Allow string fomatting in rx.html component [REF-1626] Allow string fomatting in rx.html component Jan 8, 2024
@masenf
Copy link
Collaborator

masenf commented Jan 8, 2024

Thanks for the update, will investigate.

@masenf masenf self-assigned this Jan 8, 2024
@masenf masenf modified the milestones: v.16, v.17 Jan 8, 2024
@masenf masenf modified the milestones: v.17, v.18, v.19 Jan 16, 2024
@masenf masenf removed their assignment Jan 29, 2024
@masenf masenf modified the milestones: v.19, v.20 Jan 29, 2024
@masenf masenf modified the milestones: v.20, v.21 Feb 5, 2024
@masenf masenf modified the milestones: v.21, v.22 Feb 12, 2024
@picklelo picklelo removed this from the v.22 milestone Feb 23, 2024
@masenf masenf added this to the v.23 milestone Feb 25, 2024
@picklelo picklelo removed this from the v.23 milestone Feb 27, 2024
@masenf masenf added this to the v.24 milestone Mar 3, 2024
@masenf masenf modified the milestones: v.24, v.25 Mar 10, 2024
@masenf masenf modified the milestones: v.25, v.27 Mar 24, 2024
@masenf masenf modified the milestones: v.27, v.28, v.29 Mar 31, 2024
@masenf masenf modified the milestones: v.29, v.30, v.31 Apr 14, 2024
@masenf masenf modified the milestones: v.31, v.32 Apr 28, 2024
@masenf masenf modified the milestones: v.32, v.33, v.34 May 5, 2024
@masenf masenf removed this from the v.34 milestone May 14, 2024
@masenf masenf added this to the Custom Var Operations milestone Aug 13, 2024
@adhami3310
Copy link
Member

This is fixed with the new immutable var system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

6 participants