Skip to content

Show messages boxes for beta and nightly#1821

Closed
wilzbach wants to merge 3 commits intodlang:masterfrom
wilzbach:msg-box
Closed

Show messages boxes for beta and nightly#1821
wilzbach wants to merge 3 commits intodlang:masterfrom
wilzbach:msg-box

Conversation

@wilzbach
Copy link
Copy Markdown
Contributor

dlang/tools#251 needs to be pulled first.

@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

$(CHANGELOG_NAV_LAST 2.074.1)

$(VERSION Jul 16, 2017, =================================================,
$(BETA_VERSION Jul 16, 2017, =================================================,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To avoid doing this manually, there will be --release-type=beta (dlang/tools#251)

)
$4
)
VERSION=$(STABLE_VERSION $0)
Copy link
Copy Markdown
Contributor Author

@wilzbach wilzbach Jul 13, 2017

Choose a reason for hiding this comment

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

For compatibility, in a follow-up we could do a quick sed to remove this.

$(MESSAGE_BOX red, Unstable - nightly releases are not suited for production. Use stable.)
)
$4
$3
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In dlang/tools#251 the format is unified, that's why the tools PR needs to be pulled first.

}

/**
* Message boxes - different color for each category
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As it turns out even without #1778, the message boxes are universally useful.

MENU_W_SUBMENU = <li class='expand-container'><a class='expand-toggle' href='#'><span>$0</span></a>
MENU_W_SUBMENU_LINK = <li class='expand-container'><a class='expand-toggle' href='$1'><span>$+</span></a>
MENU_W_SUBMENU_END = </li>
MESSAGE_BOX = $(DIVC message-box message-box-$1, $+)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We might define RED_MESSAGE_BOX or ERROR_MESSAGE_BOX etc. in the future, but for now I kept it as bloat-free as possible.

changelog/${NEXT_VERSION}_pending.dd: | ${STABLE_DMD} ../tools ../installer
$(STABLE_RDMD) $(TOOLS_DIR)/changed.d $(CHANGELOG_VERSION_MASTER) -o $@ \
--version "${NEXT_VERSION} (pending)" --date "Pending" --nightly
--version "${NEXT_VERSION} (Nightly)" --date "To be released" --release-type "nightly"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nightly is more meaningful than "pending"

@wilzbach
Copy link
Copy Markdown
Contributor Author

Not so sure how well this will work without the tools PR, hence two screenshots:

image

image

@CyberShadow
Copy link
Copy Markdown
Member

TBH the boxes seem too much to me. Not only are they really distracting (at least as they are in your screenshots), but the changelog is not the place for telling the user how (not) to use a version. I would suggest a much simpler, subtler change - enough that people are not going to be confused about the changelog of a yet-unreleased version.

@wilzbach
Copy link
Copy Markdown
Contributor Author

TBH the boxes seem too much to me. Not only are they really distracting (at least as they are in your screenshots), but the changelog is not the place for telling the user how (not) to use a version. I would suggest a much simpler, subtler change - enough that people are not going to be confused about the changelog of a yet-unreleased version.

Sure, we can insert anything we want there once we have specific templates from the changed tool.

@MartinNowak
Copy link
Copy Markdown
Member

I like the idea to add extra information such as "report bugs to issues.dlang.org", but I doubt there is any individual in our target audience that doesn't have a basic understanding of what a beta and nightlies are.

@CyberShadow
Copy link
Copy Markdown
Member

but I doubt there is any individual in our target audience that doesn't have a basic understanding of what a beta and nightlies are.

Yep, just to clarify - currently on http://dlang.org/changelog/2.075.0_pre.html the only clues that this is the pending changelog of a yet-unreleased version is the URL and the (for now) future date.

@MartinNowak
Copy link
Copy Markdown
Member

MartinNowak commented Jul 15, 2017

Yep, just to clarify - currently on http://dlang.org/changelog/2.075.0_pre.html the only clues that this is the pending changelog of a yet-unreleased version is the URL and the (for now) future date.

That got broken with #1817 as it's using the generic make rule now, it used to say to be released.
Marking this more clearly makes sense, what about the stale URLs though?

@CyberShadow
Copy link
Copy Markdown
Member

That got broken with #1817 as it's using the generic make rule now, it used to say to be released.

Aaaah. Sorry.

what about the stale URLs though?

Hmm, that's a fair concern, though when the content of the page is bound to change, keeping the links working isn't as important, as an old link will not point to the version of the page at the time when the link was created anyway.

I think we can go with a .htaccess rule that redirects nonexisting _pre / _pending requests to the corresponding stable page.

@wilzbach
Copy link
Copy Markdown
Contributor Author

That got broken with #1817 as it's using the generic make rule now, it used to say to be released.
Aaaah. Sorry.

Huh? @MartinNowak don't you commit the _pre file into the repository?
It's quite interesting how it worked before:

https://web.archive.org/web/20170703054803/https://dlang.org/changelog/2.075.0.html -> "to be released Jul 9, 2017"
https://web.archive.org/web/20170703033505/http://dlang.org/changelog/2.075.0_pre.html -> "released Jul 9, 2017"

We could, of course, always generate _pre as well and avoid the need to push it into the repos, but I think you currently push it because of the release date?
With dlang/tools#251 _pre would have its own ddoc template, so you wouldn't need to adjust the generated file anymore for this ;-)

@MartinNowak
Copy link
Copy Markdown
Member

MartinNowak commented Jul 16, 2017

Huh? @MartinNowak don't you commit the _pre file into the repository?
It's quite interesting how it worked before:

Read the Makefile ;), we were using different macros for those changelogs. IMO a better mechanism than hardcoding differences into the changed tool.
The added NEXT_VERSION always used _pre.html for whatever reason, hence the beta and the pending changelog coexisted until #1823 (under confusing URLs).

There are two parts that need to happen for a proper pending changelog during beta.

We need to get a proper NEXT_VERSION. I can write the current beta and the latest version to the dlang.org repo, or we might use dmd's VERSION file which is now updated like git describe and contains the latest beta/release tag.
See https://gist.github.com/MartinNowak/a471fe7ddbfeef205cdf04c93a94c6d0/962d62ce7d0f608f352fbdec051cc809cfa79cde#file-release-sh-L75 for more info.
We should definitely fix the terminology and use consistent file names (version, stable version, latest version, prerelease version,..., #1824 looks confusing to me).

We need to purge the changelog in time. I'd suggest we extend the changed tool so that it can append new loose changelog entries to a committed changelog/2.075.0_pre.dd file. That way I can purge the changelogs on stable and merge that back fairly soon. Also avoids the duplication which sometimes leads to people editing the wrong file.
This should still work with multiple release branches and backporting as loose changelog entries are part of PRs (or can be picked as well).

@wilzbach, @CyberShadow

@MartinNowak
Copy link
Copy Markdown
Member

Ping on this, just pulling of the NEXT_VERSION based on dmd/VERSION should be fairly straightforward.
Enhancing the changed tool is a bit more effort, but not necessary to get the changelog preview running, just to make it accurate.

@MartinNowak
Copy link
Copy Markdown
Member

BTW, quite a nice changelog.
https://jenkins.io/changelog/

Might be a nice idea to combine all the changelog TOCs on the index page.
https://dlang.org/changelog/index

Not sure how they produce the overall points, maybe some fancy burndown planning, but that doesn't carry too much value IMO.

@wilzbach
Copy link
Copy Markdown
Contributor Author

wilzbach commented Dec 7, 2017

Fair enough, let's close this then.

@wilzbach wilzbach closed this Dec 7, 2017
@wilzbach wilzbach deleted the msg-box branch December 7, 2017 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants