You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

50m 8s logged

DM Creation Menu Base

It is time to start on the menus for actually creating archives. Spaces and DMs have the same basic elements, so I am planning to create a few custom widgets that I can reuse for both of them. I decided that I would start with creating the DM creation, as DMs are a bit simpler than spaces.

Hub Menu

The first thing I created was a hub menu that will be used to create new DMs, Spaces, or Export the archive. It is fairly similar to the Main Menu, except that I used tcss instead of a container to centre the buttons. i think that this makes the code cleaner, and makes more sense with how textual works. I had a small problem where nothing was happening after I added content-align to my tcss file for the Hub Menu; as it turns out I needed normal align to align buttons.

DM Creation Menu

This menu has a basic docked sidebar just like the User Creation Menu. I am hoping that the plan of using single widgets that “plug in” will prevent UI issues like the user Creation Menu has.

ID and Archive Handling

I added a scripts folder with two small scripts:

  1. id_handeler to create the IDs for each message archive

  2. archive_handeling for classes to store archive, and, in the future, handle exporting

The ID handler contains a single Enum with values for DMs and Spaces. It also has a single static function to create a custom ID using Python’s uuid and base64 libraries, adding the correct DM or Space value based on the passed type. The archive handler currently contains two stub classes, one for storing archives, and another for storing messages. As more features are added, these classes will grow as well.

0
2

Comments 0

No comments yet. Be the first!