Skip to content

Make title change events more readable by stacking them - #5658

Closed
cheap-glitch wants to merge 6 commits into
mainfrom
align-title-edit-events
Closed

cheap-glitch wants to merge 6 commits into
mainfrom
align-title-edit-events

Conversation

@cheap-glitch

Copy link
Copy Markdown
Contributor

#5657 (comment)

Test URLs

https://togithub.com/refined-github/refined-github/pull/5626#event-6609835934

Screenshot

Before

image

After

image

@cheap-glitch cheap-glitch changed the title Align vertically the old and new titles in title edition events Align vertically the and new titles in title edition events May 23, 2022
@cheap-glitch cheap-glitch changed the title Align vertically the and new titles in title edition events Align vertically old and new titles in title edition events May 23, 2022
@FloEdelmann

Copy link
Copy Markdown
Member

Is it possible (and worth the effort) to move the date into the first line to save some vertical space?

grafik

@fregante fregante changed the title Align vertically old and new titles in title edition events Make title change events more readable by stacking them May 29, 2022
@fregante

Copy link
Copy Markdown
Member

Is it possible (and worth the effort) to move the date into the first line to save some vertical space?

Should be feasible with flex:

  1. set to column
  2. set min width to 100% for the titles
  3. change order of time to 1, I think
  4. ???
  5. Merge PR

@cheap-glitch

Copy link
Copy Markdown
Contributor Author

Done!

image

Couldn't use flex-order: column because of the DOM, but flex-wrap: wrap + flex: 1 0 100% does the trick.

@ajmeese7 ajmeese7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great stuff, looks good to me!

@fregante fregante changed the title Make title change events more readable by stacking them Short 1 Jun 4, 2022
@fregante fregante changed the title Short 1 Short 1123 Jun 4, 2022
@fregante fregante changed the title Short 1123 Make title change events more readable by stacking them Jun 4, 2022
fregante added a commit that referenced this pull request Jun 4, 2022

@fregante fregante left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This breaks other events. Test on #4030
We should also inline this URL for future reference

Before

Screen Shot 1

Screen Shot 6

After

Screen Shot 2

Screen Shot 5

@cheap-glitch

Copy link
Copy Markdown
Contributor Author

This breaks other events

Fixed it by excluding the branch-related events and correcting the labels:

image

image

(The vertical alignment of the label is not exactly the same, but if anything I find them better aligned now).

@cheap-glitch
cheap-glitch requested a review from fregante June 6, 2022 17:07
@fregante

fregante commented Jun 7, 2022

Copy link
Copy Markdown
Member

Is there a safer way? I'd rather use simpler/safer code to just stack them without altering the time position than risk breaking other events. Can we be sure we're not messing up the order of any event?

@cheap-glitch

cheap-glitch commented Jun 7, 2022 •

Copy link
Copy Markdown
Contributor Author

Can we be sure we're not messing up the order of any event?

Only <ins> and <del> elements have they order changed. Afaict the "title change" events are the only ones with those.

The problem is that we have to make .TimelineItem-body a flex container regardless, and this is what breaks some other events (not the reordering).

@fregante

fregante commented Jun 12, 2022 •

Copy link
Copy Markdown
Member

not the reordering

order is not what's breaking it indeed, but it's the reordering that requires that we use flex. Without it, it's a simple event (ins, del) {display: block}, right?

I don’t think saving 15px vertically is worth the headache and likely future bugs. I'd go with:

Screen Shot 14

@cheap-glitch

Copy link
Copy Markdown
Contributor Author

Closing in favor of #5703

@fregante
fregante deleted the align-title-edit-events branch June 21, 2022 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants