Skip to content

Less attention grabbing hint to draft a new release#5854

Closed
lode wants to merge 6 commits into
refined-github:mainfrom
lode:less-attention-grabbing-release
Closed

Less attention grabbing hint to draft a new release#5854
lode wants to merge 6 commits into
refined-github:mainfrom
lode:less-attention-grabbing-release

Conversation

@lode
Copy link
Copy Markdown

@lode lode commented Jul 26, 2022

Fixes #5851.

On merged PRs which are not (yet) part of a release a banner is shown to hint to create a release. This PR changes it from a banner & button, to regular text & link.

I also changed the wording a little, but if this is not wished it can be reversed of course. I did it can be confused for other forms of 'releasing', like deploying. I didn't remove the word 'release', just used other language to make it more understood as a noun.

I'm unsure about the conventions of html elements & classes. I borrowed a class from GitHub to make the text color a little more muted. Is that okay or should a RG class be made & used?

Test URLs

It can be seen on any merged PR which is not part of a release. Note that due to #5850, the banner/text isn't shown when the repository doesn't use releases at all.

Current example: #5850.

Screenshots

From current situation:
afbeelding

To new situation:
afbeelding

@lode lode marked this pull request as ready for review July 26, 2022 11:31
@fregante
Copy link
Copy Markdown
Member

It looks good, but I’m not sure the icon works there. Should we use .Btn-link on the A tag?

@lode
Copy link
Copy Markdown
Author

lode commented Jul 26, 2022

I can agree, the icon is a little weird for an inline link. I will remove.

Adding .btn-link causes a background-color when hovering, that's not really nice I think.

@fregante
Copy link
Copy Markdown
Member

Not a super fan of how it looks/aligns to be honest 😅

Screen Shot 8

I added some spacing next to the link in my last commit

Copy link
Copy Markdown
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

I think we should use the same style/alignment as the other two events visible in my screenshot above, including the button (but no horizontal rule/line)

or this "message bubble" style:

Screen Shot

HTML
<form class="ml-0 pl-0 ml-md-6 pl-md-3 my-3 branch-action branch-action-state-closed-dirty js-immediate-updates js-needs-timeline-marker-header" data-turbo="false" action="/xojs/xo/pull/620/cleanup" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="">
  <span class="branch-action-icon d-none d-md-flex flex-items-center flex-justify-center">
    {svgicon}
  </span>
  <div class="branch-action-body timeline-comment--caret">
    <div class="post-merge-message">

      <div class="Details">
        <h4 class="merge-branch-heading">
            Pull request closed
        </h4>
        <p class="merge-branch-description">
            <span>
              If you wish, you can delete this fork of <strong>xojs/xo</strong> in the <a href="/fregante/xo/settings?confirm_delete=yes">settings</a>.
            </span>
        </p>
      </div>
    </div>
  </div>
</form>

@lode
Copy link
Copy Markdown
Author

lode commented Aug 8, 2022

Yeah, good points. The inconsistency is also not nice, it becomes more busy if we add yet another style. Since it is not an event the banner styling is more correct. If I understand you correctly, we can just keep the styling as is, but remove the background color? (Like in the 'Pull request closed' banner, but then with the button and right-floating as currently.)

@fregante
Copy link
Copy Markdown
Member

fregante commented Aug 9, 2022

I think we can reuse the whole markup I pasted. It's essentially the same concept:

  • PR merged, delete fork?
  • PR merged, create release?

Generally these two won't appear at the same time because people who send PRs from temporary forks aren't the same who can create a release.

The same bubble style could also be ok for every usage in the feature though.

@fregante fregante marked this pull request as draft August 16, 2022 06:41
@lode
Copy link
Copy Markdown
Author

lode commented Aug 28, 2022

I'm not sure I understand. The screenshot you attached, looks the same as the current situation, doesn't it?

@fregante
Copy link
Copy Markdown
Member

I'm not sure I understand. The screenshot you attached, looks the same as the current situation, doesn't it?

I'm talking about the "Pull request closed" style. It's true that it's similarly-sized, but it's not colored and it's what GitHub uses for a very similar intent: You can do something now that the PR has been merged.

@fregante
Copy link
Copy Markdown
Member

Or like this, which I mentioned as an alternative:

Screen Shot

@lode
Copy link
Copy Markdown
Author

lode commented Aug 28, 2022

Ah, I understand.

Some thoughts I have about these:

  • The PR closed, delete the fork style: it does worry me a little that there is a chance both banners would be shown at the same time, and then the speech bubble is a bit weird.
  • The alternative deleted branch style: it doesn't feel correct, since that is about an event placed on the timeline, which this is not.

I'm more inclined to keep the same situation as now, but with a transparent instead of a blue background. This:

  • keeps the styling similar to how it is now, not changing too much for current users
  • keeps the styling in sync with the first-appeared-in banner, which is nice I think
  • gives it less attention, just like GH decided upon for the delete fork banner with similar intent

Although, thinking about the last point. Deleting a fork is less important than drafting a release. So maybe the extra attention is worth it. I'm also fine closing this PR. I think it was good that the banner was removed if a repo doesn't have releases at all, with that this might be good as is.

@fregante
Copy link
Copy Markdown
Member

fregante commented Aug 29, 2022

both banners would be shown at the same time,

Super rare. People who can release a new versions don't generally use forks. If they do, that's their own issue 😃

that is about an event placed on the timeline, which this is not.

I agree, that's why the bubble works, exactly like GitHub is doing.

keep the same situation as now, but with a transparent instead of a blue background

That works for me, it's also the easiest probably, except that I'm not sure how to safely override the Banner styles. 🤔

I'm also fine closing this PR

That's ok, someone else can do it too.

@fregante
Copy link
Copy Markdown
Member

Feel free to send a new PR

@fregante fregante closed this Sep 25, 2022
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.

Push less towards creating releases after merged PRs

2 participants