Pixelo789

Collections Week 1 Summary

I'm developing a collection application, under the highly creative name of "Collections". The source code is on Codeberg, as always:

Codeberg repository

A screenshot of an application I've developed, called "Collections". The UI has three panels. The left panel has a header bar with a menu button, and one button called "Empty Panel" in the middle (this is where the list of collections would go). The middle has a header bar at the top and a grid view at the bottom. Its header bar contains a button to toggle the left panel, a view switcher, a label that would describe the title of the collection, a button to add an item, and a search button. The middle grid view has many elements; each has a grey box with a label in the form "String NUMBER" under it. The right panel has a header bar with a label (the name of the item), a favourite button, an edit button, and the window controls at the top, and a text view describing the selected item in the middle. It is currently showing an example; most of the text is lorem-ipsum style.

This is a recap of the past week of development.

This week, I focused on UI, getting a little more than enough done to show off UI.

Overviews

Day 1

I created the repository and started working on the UI. I previously had done the work to get Blueprint working in Lua, so starting the repo was as simple as a copy-paste. I also went ahead and made a request to get the "app.drey.Collections" app ID. Currently, it hasn't gone through; hopefully, it will go through soon.

Blueprint

App ID request

Day 2

I committed an initial UI for the app. Other than that, it was polish and adding some shortcuts.

Day 3

I added a dialog for adding and editing items. I messed with/iterated on the dialog for that day.

Day 4

I did more work on the add/edit dialog. I also did some work on the favourites button and info panel, making it be created from a Lua table instead of being hard-coded. I finally added lua-cjson as a dependency, as I decided to use JSON to store data.

Day 5

Along with some cleanup and minor improvements to the add/edit dialog and the info panel, I documented how the collections JSON file will be organised. I'm waiting until week 2 to fully implement it, but I wanted it documented to make it easier and get it out of my head.

Day 6

I worked on the main view. It is currently only a grid, with toggling between list and grid being for week 2, but it's still progress.

Day 7

I changed the app ID because the app.drey request was taking too long. I also worked on researching how to implement the grid view.

I started with trying to find an application that would require a remotely complicated data system for its view, and decided on Dosage. Enough digging led me to how it creates a class for its list, and that led me to the GJS function "GObject.ParamSpec.jsobject". It is, in principle, what I want, and it thankfully is a (seemingly) trivial call to the function "GObject.param_spec_boxed", so it should (hopefully) be fairly simple to replicate in Lua.

Dosage

How Dosage creates classes for its list

"GObject.ParamSpec.jsobject" in GJS

"GObject.param_spec_boxed" C function documentation

Goals for next week

I want to get it into a somewhat usable state next week. This means parsing and saving a "collections.json" file and loading and displaying it properly.

---

The source code is on Codeberg if you want to go check it out:

Codeberg repository