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

snake_case the TextView component #4948

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Conversation

manivoxel51
Copy link
Contributor

What changes are proposed in this pull request?

tested locally

def render(self, ctx):
        panel = types.Object()

        text_view_0 = types.TextView(
            title="Voxel",
            variant="body1",
            font_size="1.2rem",
            color="primary",
            bold=True,
            text_transform="uppercase",
            width="auto",
            display_mode="inline-block",
            padding={0}
        )
        text_view_01 = types.TextView(
            title="Fiftyone",
            variant="body1",
            font_size="1.2rem",
            color="red",
            bold=False,
            italic=True,
            text_transform="uppercase",
            width="auto",
            display_mode="inline-block",
            padding={0}
        )

        text_view_1 = types.TextView(
            title="Primary Bold Text",
            variant="body1",
            font_size="1.2rem",
            color="primary",
            bold=True,
            text_transform="uppercase",
            align="center",
            width="100%",
            display_mode="block"
        )

        text_view_2 = types.TextView(
            title="Italic Secondary Text",
            variant="body2",
            font_size="1rem",
            color="secondary",
            italic=True,
            align="left",
            no_wrap=True,
            text_decoration="underline",
            letter_spacing="0.1em",
            display_mode="inline"
        )

        panel.view("text_view_0", text_view_0)
        panel.view("text_view_01", text_view_01)

        panel.view("text_view_1", text_view_1)
        panel.view("text_view_2", text_view_2)


        panel_view = types.GridView(
            width=100, height=100, align_x="center", align_y="center"
        )
        return types.Property(panel, view=panel_view)

How is this patch tested? If it is not, please explain why.

(Details)

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

(Details in 1-2 sentences. You can just refer to another PR with a description
if this PR is part of a larger change.)

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

@manivoxel51 manivoxel51 merged commit b095575 into panel Oct 18, 2024
1 check passed
@manivoxel51 manivoxel51 deleted the bug/fix-casing-textview branch October 18, 2024 20:34
@manivoxel51 manivoxel51 restored the bug/fix-casing-textview branch October 22, 2024 00:25
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.

1 participant