Customizing Workspaces and Workspace Pages

Introduction

Welcome to this comprehensive guide that dives deep into the technical realm of Empress, focusing on the feature that empowers developers to customize workspaces and workspace pages. This guide will equip you with the knowledge to leverage the feature’s functionality, centering on backend functionality, code integration, and technical details.

Feature Name: Customizing Workspaces

Customizing workspaces involves a range of actions that developers can perform to tailor the workspace to their needs. These alterations are primarily conducted via the sidebar, except for the creation of a new workspace.

Updating Workspace Details

Developers can alter the title and icon of the workspace. They also have the power to designate a workspace as parent or child, and switch its visibility between public or private.

# Edit workspace details
workspace.title = "New Title"
workspace.icon = "new-icon.png"
workspace.parent = True
workspace.visibility = "private"
workspace.save()

Creating a Duplicate Workspace

This feature allows the creation of a duplicate workspace which can be further customized according to developer needs.

# Create a duplicate workspace
duplicate_workspace = workspace.duplicate()
# Add or remove blocks
duplicate_workspace.add_block(new_block)
duplicate_workspace.remove_block(old_block)

Deleting a Workspace

Developers can remove an existing workspace directly from the sidebar.

# Delete workspace
workspace.delete()

Hiding a Workspace

Private workspaces can be hidden from view. Only a Workspace Manager has the power to hide public workspaces.

# Hide workspace
workspace.hide()

Rearranging Workspace Position

Developers can alter the position of a workspace in the sidebar, or designate it as a parent/child workspace.

# Rearrange workspace
workspace.rearrange(new_position)

All changes made to the workspace from the sidebar are saved immediately, eliminating the need for manual saving.

Feature Name: Customizing Workspace Page

Customizing workspace pages involves tailoring the blocks within a workspace page.

Adding a New Block

Developers can add new blocks to existing workspace pages.

# Add new block
workspace_page.add_block(new_block)

Editing an Existing Block

Existing blocks can be edited to suit the developer’s needs.

# Edit block
block.edit(new_content)

Deleting an Existing Block

Developers can remove blocks from a workspace page.

# Delete block
workspace_page.delete_block(block)

Resizing a Block

The width of a block can be adjusted for better fit and organization.

# Resize block
block.resize(new_width)

Rearranging a Block

Developers can rearrange the order of blocks within a workspace page.

# Rearrange block
workspace_page.rearrange_block(block, new_position)

Conclusion

The ability to customize workspaces and workspace pages is a fundamental feature in Empress. It allows for extensive customization and adaptation, granting developers the power to create workspaces and workspace pages that fit their unique needs. This feature, consequently, contributes to the development of tailored business solutions. Harness this feature to optimize your Empress experience and streamline your software development process.