Skip to content

Conversation

@chimosky
Copy link

@chimosky chimosky commented Mar 3, 2025

I've made some changes to the metadata panel, and I'd like to know if I'm headed in the right direction and how to proceed.

@romicolman kindly review, this is from #727 and I was told you'll help point me in the right direction.


Please make sure that all the checks pass. Please add here any additional information regarding this pull request. It's highly recommended that you link this PR to an issue (please create one if it doesn't exist for this PR)

chimosky added 7 commits March 3, 2025 21:34
Each page in the metadata widget is now a tab, I implemented this according to the
designs in okfn#670.

Each tab contains the Resource metadata with its pages and the
form that corresponds to each page, as tabs they're positioned
side by side just like in the design and this makes it easier to
view each page.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
The forms were moved to tabs as that's where they're now being
used, also to avoid circular imports.

Each tab is now a separate widget with buttons pointing to
the forms in that tab, they all conform to the same interface.

This makes the tabs modular and also easier to find and fix
issues when they arise.

I've only added the forms that exist and commented out the ones
yet to exist.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
The push buttons occupy every space the QVBoxLayout gives
it, this commit pushes the buttons to the top and also
sets the spacing between buttons.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
This makes it so child widgets don't fill the entire
space given by the parent.

I've also added basic css to some widgets, I'll put them all
in a css file to make it easier as there will be shared by the
various tabs.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
I've improved the style of metadata panel by directly applying
stylesheets to some of the widgets and also using a stylesheet
file to read some styles for other widgets.

The aim in the end is to keep the changes to widget in a stylesheet
so it's easier to manage.

I also set a RowWrapPolicy for the forms, this makes the form look
more like the initial design, although QFormLayout lays out its children
in a two-column form, with the labels in the left column and the
field widgets in the right column.
This makes it a bit difficult to completely follow the design as it has
two field widgets in each row, so we'll have to rethink this if we
want to stick to the design.

I thought about achieving the same thing using a grid, just haven't
tried it yet.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
Also adhere to existing pattern by using self.tr

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
@romicolman
Copy link
Collaborator

HI @chimosky! First of all, thank you very much for contributing to the ODE. It's great to see that the ODE is getting contributions!

I managed to see your implementations. A couple of comments based on what I see:

  • I use Mac. I'm not able to see all fields in my screen. Here is a screenshot of my current view:
Captura de pantalla 2025-03-05 a las 14 18 38

Idea: distribute fields across the screen as we did for the stable version:

Captura de pantalla 2025-03-05 a las 14 27 29
  • We would like to keep all sections and metadata categories on the left side. We know that the stable version had the main menu at the top, but for the migrated one we want to follow the "tree logic" that we have on the sidebar.
  • Resource section: I'm not able to see fields under the Source and Contributors categories.
  • Dialect: default fields are missing. Same for the Csv category
  • Schema: I'm not able to edit the default fields (name, primary key, title, etc.).

Additional comments

If possible, could you remove the Metadata term serving as the section title?
Captura de pantalla 2025-03-05 a las 14 41 36

General style: can we apply to the metadata panel the same font and style that we have for the rest of the application?

Thank you so much for collaborating with the ODE, @chimosky !

chimosky added 4 commits March 6, 2025 23:18
Items in the form are now in a grid and placed where
we want them.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
Improve the style of QLineEdit and QLabel.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
Adjust spacing in layouts to fit correctly.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
Using QTabWidget made it difficult to style the tab,
and tab text, switching to push buttons makes it easier
to style the text and buttons, which in turn gives us the
flexibility to maintain the existing design.

Signed-off-by: Chihurumnaya Ibiam <ibiamchihurumnaya@gmail.com>
@chimosky
Copy link
Author

chimosky commented Mar 8, 2025

@romicolman I've addressed some of the issues you mentioned, kindly test.

I'm also trying to resolve the issue of applying the same font and style to the metadata panel, I'll get to it once I can.

@chimosky
Copy link
Author

@romicolman any info on this?

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.

2 participants