Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Entity layout and minor UI changes#832

Open
paul121 wants to merge10 commits intofarmOS:3.x
base:3.x
Choose a base branch
Loading
frompaul121:3.x-ui

Conversation

paul121
Copy link
Member

My original motivation for this was to improve the display of the "Add new comment" field on entities. Ultimately I think the best solution is to make each of our layout regions use the "gin-layer-wrapper" styles so they get a background color/shadow and are lifted on the page to match the existing comment styles. Then decreasing the size of the comment text headers (h2 is pretty big) makes things look nice.

Last, some minor changes to make other css in farm_ui_theme consistent.

@paul121
Copy link
MemberAuthor

paul121 commentedApr 23, 2024
edited
Loading

Some before/after examples...

Assets

asset-before
asset-after

Logs

log-before
log-after

Comment on lines +15 to 18
/* Hide layout regions if there is no content. */
.layout--twocol .layout__region:not(:has(div)){
display: none;
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hmm finding some situation where this might not work.

Screenshot from 2024-04-23 12-53-30

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This seemed to be caused by an empty<div> that seems like it would have displayed error/warning messages but it didn't render any and I haven't been able to reproduce. I was in-between switching branches and clearing cache so it's possible it was a fluke but I do wonder if this is an issue.

@paul121
Copy link
MemberAuthor

I will try and get some more screenshots (mobile!) with more data on these pages. Most notably log quantities and files that are attached to the page.

@paul121
Copy link
MemberAuthor

A couple more screenshots with more data... definitely a few things to clean up, but the mobile LGTM!

Anyone have thoughts on the below?@mstenta@Farmer-Eds-Shed@Fosten@symbioquine

  1. Images are dropped in theright dashboard region, sometimes above other fields (is_location,is_fixed, see asset example).
    • I think we should consider adding in theImages field label and try to make images appear last in this column.
    • OR should we move images to the bottom with files? Only display the first image above?
  2. Files are dropped in thebottom dashboard region above comments, inconsistent styling.
    • We should add aFiles field label to make it clear what these are. Also need to make sure there is some margin/spacing between the Files + Comments.
    • Also, because the Files are rendered in anothergin-layer-wrapper, this makes the comments look a little weird... hmm. We could make comments behave similarly but if other modules add fields to this bottom dashboard region they would have some inconsistency as well.
    • Maybe consider making the files render in a collapseddetails?
  3. Consider moving more "meta" fields to theright dashboard region?
    • I first noticed this for the "Land Type" field (see asset example). It seems this might make more sense under the "Asset Type" field in theright region. BUT.... the Land Type edit form is in the main region, not the sidebar... I don't know, theright sidebar doesn't need to only be "meta" fields...
    • Maybe move "Flags", "Log Category" to theright ?
    • Move "Land Type" above "Flags"
Asset

more-data
more-data-2

Log

log-more-data
log-more-data-2

Log mobile

mobile-log
mobile-log-2

@paul121paul121 requested review frommstenta and removed request formstentaMay 16, 2024 19:11
@paul121
Copy link
MemberAuthor

I've pulled out some of the items from this PR into#846 and#847 - let's pick up the styling aspects of this issue after those are reviewed/merged

Copy link
MemberAuthor

@paul121paul121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

definitely a few things to clean up, but the mobile LGTM!

Just revisiting this, on mobile the Log type + Status should probably at the top of the screen. As is, these are in the "right" column which gets moved down below the "left" column. Not sure the best solution... either move Log type + Status, or move the right column above the left on smaller screens? I think this will be better with#847

Comment on lines -45 to +52
'weight' => [
'view' => 95,
'view_display_options' => [
'label' => 'hidden',
'type' => 'farm_map_geofield',
'settings' => [
'output_format' => 'wkt',
'output_escape' => TRUE,
],
'weight' => 95,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Instead of explicitly settingview_display_options here (which requires setting all the other bits and sub-settings), can we leave this as it was, but put a line after the call to\Drupal::service('farm_field.factory')->baseFieldDefinition($options); which simply sets thelabel tohidden?

For example:

$fields['geometry'] = \Drupal::service('farm_field.factory')->baseFieldDefinition($options);// Hide the geometry field label in the view display.$view_display_options = $fields['geometry']->getDisplayOptions('view');$view_display_options['label'] = 'hidden';$fields['geometry']->setDisplayOptions('view', $view_display_options);

This makes it very explicit what we're doing, and means that if any of those other settings change infarm.field_factory in the future we don't need to remember to update them here as well.

Comment on lines +163 to +171
'view_display_options' => [
'label' => 'hidden',
'type' => 'farm_map_geofield',
'settings' => [
'output_format' => 'wkt',
'output_escape' => TRUE,
],
'weight' => 95,
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(Same as above)

@mstenta
Copy link
Member

It seems like there are still some bigger questions to answer / decisions to make with this PR generally (although I love where we're headed with it)! I'm inclined to wait until after the 3.3.0 release so we have more time to work through it.

@mstenta
Copy link
Member

We decided on the dev call today to merge#847 first for farmOS v3.3.0, and then rebase this and pick up where we left off with it.

@mstentamstenta removed this from thev3.3.0 milestoneSep 19, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mstentamstentamstenta requested changes

Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@paul121@mstenta

[8]ページ先頭

©2009-2025 Movatter.jp