Repository: Avaiga/taipy
File: taipy/gui/_renderers/factory.py (Python)

Code before:
        "tree": lambda gui, control_type, attrs: _Builder(
            gui=gui,
            control_type=control_type,
            element_name="TreeView",
            attributes=attrs,
        )
        .set_value_and_default(with_default=False, var_type=PropertyType.lov_value)
        .set_attributes(
            [
                ("active", PropertyType.dynamic_boolean, True),
                ("expanded", PropertyType.boolean_or_list, True),
                ("filter", PropertyType.boolean),
                ("hover_text", PropertyType.dynamic_string),
                ("height", PropertyType.string_or_number),
                ("id",),
                ("value_by_id", PropertyType.boolean),
                ("multiple", PropertyType.boolean),
                ("width", PropertyType.string_or_number),
                ("on_change", PropertyType.function),
                ("select_leafs_only", PropertyType.boolean),
                ("row_height", PropertyType.string),
                ("lov", PropertyType.lov),
            ]
        )
        ._set_propagate(),
        "ProgressBar": lambda gui, control_type, attrs: _Builder(
            gui=gui,
            control_type=control_type,
            element_name="ProgressBar",
            attributes=attrs,
        )
        .set_attributes(
            [
                ("linear", PropertyType.boolean, False)
                ("showProgress", PropertyType.boolean, False),
            ]
        )
        ._set_propagate(),
    }

    # TODO: process \" in property value
    _PROPERTY_RE = re.compile(r"\s+([a-zA-Z][\.a-zA-Z_$0-9]*(?:\[(?:.*?)\])?)=\"((?:(?:(?<=\\)\")|[^\"])*)\"")

    __COUNTER = 0

    @staticmethod
    def set_library(library: "ElementLibrary"):
        from ..extension.library import Element, ElementLibrary

        if isinstance(library, ElementLibrary) and isinstance(library.get_name(), str) and library.get_elements():
            elements = library.get_elements()

Review comment (suggestion):
I suppose `Progress` is more generic than `ProgressBar` (especially when we want to support circular progress)

Code after:
            ]
        )
        ._set_kind()
        ._set_propagate(),
        "tree": lambda gui, control_type, attrs: _Builder(
            gui=gui,
            control_type=control_type,
            element_name="TreeView",
            attributes=attrs,
        )
        .set_value_and_default(with_default=False, var_type=PropertyType.lov_value)
        .set_attributes(
            [
                ("active", PropertyType.dynamic_boolean, True),
                ("expanded", PropertyType.boolean_or_list, True),
                ("filter", PropertyType.boolean),
                ("hover_text", PropertyType.dynamic_string),
                ("height", PropertyType.string_or_number),
                ("id",),
                ("value_by_id", PropertyType.boolean),
                ("multiple", PropertyType.boolean),
                ("width", PropertyType.string_or_number),
                ("on_change", PropertyType.function),
                ("select_leafs_only", PropertyType.boolean),
                ("row_height", PropertyType.string),
                ("lov", PropertyType.lov),
            ]
        )
        ._set_propagate(),
        "progress": lambda gui, control_type, attrs: _Builder(
            gui=gui,
            control_type=control_type,
            element_name="Progress",
            attributes=attrs,
        )
        .set_value_and_default(var_type=PropertyType.dynamic_number)
        .set_attributes(
            [
                ("linear", PropertyType.boolean, False),
                ("show_value", PropertyType.boolean, False),
                ("render", PropertyType.dynamic_boolean, True)
            ]
        )
        ._set_propagate(),
    }

    # TODO: process \" in property value
    _PROPERTY_RE = re.compile(r"\s+([a-zA-Z][\.a-zA-Z_$0-9]*(?:\[(?:.*?)\])?)=\"((?:(?:(?<=\\)\")|[^\"])*)\"")

    __COUNTER = 0