Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add supporters tab #2880

Merged
merged 23 commits into from Aug 1, 2019
Merged

Add supporters tab #2880

merged 23 commits into from Aug 1, 2019

Conversation

vadi2
Copy link
Member

@vadi2 vadi2 commented Jul 29, 2019

Brief overview of PR changes/additions

Add supporters tab with the layout. I need help with the design here, ideas welcome! I'm stuck.

Selection_300

Motivation for adding to Mudlet

Patreon promises! :)

Other info (issues closed, discussion etc)

Patreon's branding guidelines allow the use of their logo.

@vadi2 vadi2 added this to the 4.0.0 milestone Jul 29, 2019
@add-deployment-links
Copy link

add-deployment-links bot commented Jul 29, 2019

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@SlySven
Copy link
Member

SlySven commented Jul 29, 2019

⚠️ Beware - this will clash with #2835 as they both touch the displayed licences and the other one makes changes in some of the lines modified here as well.

@Kebap
Copy link
Contributor

Kebap commented Jul 29, 2019

Here is a design suggestion for you:
image
We may need to ask folks how they want to be called here though.

@Kebap
Copy link
Contributor

Kebap commented Jul 29, 2019

My design is simple HTML & CSS with text overlaying one of two image files depending on tier:

<html><head>
  <style>
    .container {
      position: relative;
      text-align: center;
      color: black;
      font-weight: bold;
    }
    .centered {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  </style>
</head><body>
  <p><div style="text-align: center">These formidable folks will be fondly remembered forever
  <br>for their generous sponsoring on <a href="">Mudlet's patreon page:</a></div></p>
  <div class="container">
    <img src="frame_plaque.png">
    <div class="centered"><h2>Vadim Peretokin</h2></div>
  </div>
  <div class="container">
    <img src="frame_swords.png">
    <div class="centered"><h2>Maiyannah</h2></div>
  </div>
  <div class="container">
    <img src="frame_swords.png">
    <div class="centered"><h2>Qwindor Rousseau</h2></div>
  </div>
</body></html>

You could easily put this in your C++ code and have it run through a simple list of [supporter name, patreon tier] and then assemble the HTML container and appropiate image for each entry. This way, (hopefully) adding more supporters later, will be possible quite easily.

@vadi2
Copy link
Member Author

vadi2 commented Jul 30, 2019

Thanks, I've added it in. Names hardcoded until we finalize the design. Can you attach the images necessary?

{
QString supporters_text(
tr(R"(
<p><div style="text-align: center">These formidable folks will be fondly remembered forever
Copy link
Contributor

Choose a reason for hiding this comment

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

Only tr() translate this text. The rest shall be QStringLiteral and .arg()...
No need to toss these HTML piles, and supporters' names at Crowdin.

@Kebap
Copy link
Contributor

Kebap commented Jul 30, 2019

Here are the images now:
frame_plaque
frame_swords

@vadi2
Copy link
Member Author

vadi2 commented Jul 30, 2019

Thanks. Can we also have the originals so we can modify them as necessary?

@Kebap
Copy link
Contributor

Kebap commented Jul 30, 2019

@vadi2
Copy link
Member Author

vadi2 commented Jul 30, 2019

@Kebap it doesn't look like all of the css properties you're using are supported. Can you tweak it to work with what Qt supports? https://doc.qt.io/qt-5/stylesheet-customizing.html

void dlgAboutDialog::setSupportersTab(const QString& htmlHead) const
{
QString supporters_text(QStringLiteral(R"(
<p><div style="text-align: center">%1</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Anchor end tag is obsolete

Copy link
Member Author

Choose a reason for hiding this comment

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

OK fixed, but the whole thing does not look correct anyway.

Copy link
Member

Choose a reason for hiding this comment

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

Anchor end tag is obsolete

Are you sure - remember this is Qt's own Rich-text it is NOT HTML5...!

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure. Look at content of %1

@vadi2
Copy link
Member Author

vadi2 commented Jul 30, 2019

Selection_302

@Kebap
Copy link
Contributor

Kebap commented Jul 30, 2019

Thanks for the screenshot. I have searched the docs, but it seems I have reached QTextBrowser's edges with this. The alternative QWebView could render HTML better, but doesn't show local images easily.

May I suggest we use the images as headline then for now, like in the image you posted, or here:
grafik

@vadi2
Copy link
Member Author

vadi2 commented Jul 30, 2019

Hm... no, that looks poor. I'll see if I can get it to overlap, there might be a way with background-image.

@SlySven
Copy link
Member

SlySven commented Jul 30, 2019

Re: e50ca60 - that is a PITA that has bitten me as well - the current Qt Designer adding details that are not supported (and break compilation) for previous Qt versions. 🤕

@vadi2
Copy link
Member Author

vadi2 commented Jul 31, 2019

Yep. Strangely they say they have fixed it a while ago, but I dont see the effects https://bugreports.qt.io/browse/QTBUG-72555

@vadi2
Copy link
Member Author

vadi2 commented Jul 31, 2019

I'm afraid we're not using the QWebEngineView but a QTextBrowser instead - both display HTML, but one is way bigger than Mudlet itself (it's Chromium) and the other is much, much smaller and less feature rich.

@vadi2
Copy link
Member Author

vadi2 commented Jul 31, 2019

If the html won't do it, we'll make our own images!

Selection_319

Want to take this as a base and improve the look'n'feel?

@Kebap
Copy link
Contributor

Kebap commented Jul 31, 2019

❤️ the QPainter as well as the QStringList and for loops. Well done!
Not sure what you would like to see improved more in look & feel.
Given the release time, I'd rather postpone changes to a later day.

@Kebap
Copy link
Contributor

Kebap commented Aug 1, 2019

image

These formidable folks will be fondly remembered forever<br>for their generous sponsorship on <a href="https://www.patreon.com/mudlet">Mudlet's patreon</a>:
)"), supporters_image_html));
These formidable folks will be fondly remembered forever<br>for their generous financial support on <a href="https://www.patreon.com/mudlet">Mudlet's patreon</a>:
)"), supporters_image_html, tr("Go to <a href=\"https://www.patreon.com/mudlet\">patreon.com/mudlet</a> if you'd like to be mentioned here.")));
Copy link
Member Author

Choose a reason for hiding this comment

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

The tooltip is kind of degrading in the obviousness of the message it delivers - anyone can figure out that you can go there to be mentioned.

@vadi2
Copy link
Member Author

vadi2 commented Aug 1, 2019

Nice thanks, that looks better, but its too big for the default view now:

About Mudlet_320

Its like we intend to keep the list to 3 people at most and not get any more.

@Kebap
Copy link
Contributor

Kebap commented Aug 1, 2019

Thanks for spotting the crash! Indeed we need to ponder how to (hopefully) extend the list.

@vadi2
Copy link
Member Author

vadi2 commented Aug 1, 2019

I mean - make things smaller again? The text and images take up all of the default space, so it doesn't give the impression that it can grow.

image

There is also a visible inconsistency in font when you change around tabs:

Peek 2019-08-01 08-09

What do you think about keeping the first line of text consistent with others?

@vadi2
Copy link
Member Author

vadi2 commented Aug 1, 2019

Selection_322

Looks good, perhaps the best we can make it with our skills =)

@Kebap
Copy link
Contributor

Kebap commented Aug 1, 2019

This is still marked draft

@vadi2 vadi2 marked this pull request as ready for review August 1, 2019 10:56
@vadi2 vadi2 requested review from a team as code owners August 1, 2019 10:56
@vadi2
Copy link
Member Author

vadi2 commented Aug 1, 2019

Ready for review.

Copy link
Member

@keneanung keneanung left a comment

Choose a reason for hiding this comment

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

Great work, thanks to you two!

@vadi2 vadi2 merged commit 278d49f into development Aug 1, 2019
vadi2 added a commit to vadi2/Mudlet that referenced this pull request Aug 1, 2019
* Add initial tab and icon

* Refactor text setting into separate methods

* Comment improvement

* Added a super simplistic structure for the Patreon tab

* Added new HTML in

* Add images

* Remove PlaceholderText, fix Qt 5.7 compile

* Add images in

* Add missing end tag

* Remove obsolete end tag

* Set minimum size on about dialog to one that looks okay

* Re-save with GIMP and fix libpng warnings

* Draw our own images

* Update names and white space

* Layout

* Typo

* Dont create if already existing

* Dont crash when closing Mudlet

* Drop %3, save screen space

* Don't print supporter's introduction big

(cherry picked from commit 278d49f)
@vadi2 vadi2 deleted the add-patreon-tab branch August 1, 2019 17:32
vadi2 added a commit that referenced this pull request Aug 1, 2019
* Add initial tab and icon

* Refactor text setting into separate methods

* Comment improvement

* Added a super simplistic structure for the Patreon tab

* Added new HTML in

* Add images

* Remove PlaceholderText, fix Qt 5.7 compile

* Add images in

* Add missing end tag

* Remove obsolete end tag

* Set minimum size on about dialog to one that looks okay

* Re-save with GIMP and fix libpng warnings

* Draw our own images

* Update names and white space

* Layout

* Typo

* Dont create if already existing

* Dont crash when closing Mudlet

* Drop %3, save screen space

* Don't print supporter's introduction big

(cherry picked from commit 278d49f)
@Kebap
Copy link
Contributor

Kebap commented Aug 3, 2019

We need to give the images some alternative text for a11y

vadi2 added a commit that referenced this pull request Aug 8, 2019
* Remove left over debug statement for command line (#2885)

* Fix permGroup for aliases and timers (#2887)

* Remove text unnecessary for proxy translation (#2892)

* Update autocomplete list for 4.0 (#2896)

* Fix no patterns being set for triggers (#2891)

* Default-initialise the repeating boolean (#2899)

* Revert trigger editor changes (#2898)

* Revert "Fix no patterns being set for triggers (#2891)"

This reverts commit 0913755.

* Revert "Fix errors when creating new triggers (#2868)"

This reverts commit 0578c61.

* Add supporters tab (#2880) (#2906)

* Add initial tab and icon

* Refactor text setting into separate methods

* Comment improvement

* Added a super simplistic structure for the Patreon tab

* Added new HTML in

* Add images

* Remove PlaceholderText, fix Qt 5.7 compile

* Add images in

* Add missing end tag

* Remove obsolete end tag

* Set minimum size on about dialog to one that looks okay

* Re-save with GIMP and fix libpng warnings

* Draw our own images

* Update names and white space

* Layout

* Typo

* Dont create if already existing

* Dont crash when closing Mudlet

* Drop %3, save screen space

* Don't print supporter's introduction big

(cherry picked from commit 278d49f)

* Update Windows Qt - 4.0 edition (#2911)

* Move appveyor and windows SDK to Qt 5.12.4

* Fix macOS crash when saving settings (#2915)

* 4.0.0 release

* Re-set dev

* Use OpenSSL 1.1.1 on Windows (#2923)

* Use OpenSSL 1.1.1 on Windows

* Set release build

* Reset -dev

* Fix dblsqd auto attachment

* Fix mudletOlderThan() for 4.0 (#2925) (#2928)

* mudletOlderThan fix

* Logic adjustments

* Combine and straighten else clauses

(cherry picked from commit 42295a8)

* Fix Patreon link in Supporters tab to open browser (#2927) (#2930)

(cherry picked from commit 5647fe9)

* New Crowdin translations (#2838)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (French)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Simplified)

(cherry picked from commit 96e25f5)

* 4.0.2 hotfix release

* Use Qt 5.12.3 for Windows Mudlet (#2932)

* Properly initialise ssl and proxy settings (#2931)

* Actual 4.0.2 hotfix release

* Re-set dev

* Revert "Use OpenSSL 1.1.1 on Windows (#2923)" (#2934)

This reverts commit 4127624.

* 4.0.3 hotfix release (re-enable TLS/SSL in Windows)

* Re-set dev
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.

None yet

4 participants