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

Service section design changes #474

Merged

Conversation

muzammalrahim
Copy link
Contributor

Proposed changes

Checklist

  • Lint and unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added documentation to describe my feature.
  • I have squashed my commits into logic units.
  • I have described the changes in the commit messages.

Other information

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
<div class="user-img"><img src="{% static "img/Shield.png" %}"></div>
{% else %}
{% csrf_token %}
<img onclick="document.getElementById('server_user_{{owner.id}}_form').submit()" class="user-img" name="remove" value="remove" src="{% static "img/delete.png" %}">
Copy link

Choose a reason for hiding this comment

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

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

{% endfor %}
<form method="post" action="{% url 'service-user' pk=service.pk %}">
{% csrf_token %}
<input type="email" placeholder="{% trans "Invite e-mail" %}" name="email" />
Copy link

Choose a reason for hiding this comment

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

Looks like there's a label missing for this input. That makes it hard for people using screen readers or voice control to use the input.

weblate_web/templates/user.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/static/img/delete.svg Outdated Show resolved Hide resolved
weblate_web/static/style.css Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/user.html Outdated Show resolved Hide resolved
weblate_web/static/style.css Show resolved Hide resolved
Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

<div class="user-img"><img src="{% static "img/Shield.png" %}" alt="Shield"></div>
{% else %}
{% csrf_token %}
<img class="user-img" onclick="removeUser('{{owner.id}}')" name="remove" value="remove" src="{% static "img/delete.png" %}">
Copy link

Choose a reason for hiding this comment

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

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

{% endfor %}
<form method="post" action="{% url 'service-user' pk=service.pk %}">
{% csrf_token %}
<input type="email" placeholder="{% trans "Invite e-mail" %}" name="email" />
Copy link

Choose a reason for hiding this comment

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

Looks like there's a label missing for this input. That makes it hard for people using screen readers or voice control to use the input.

weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Outdated Show resolved Hide resolved
weblate_web/templates/user.html Outdated Show resolved Hide resolved
weblate_web/models.py Outdated Show resolved Hide resolved
weblate_web/templates/snippets/service.html Show resolved Hide resolved
.donation-box-updated {
display: flex;
}
Copy link
Member

Choose a reason for hiding this comment

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

Can you please just change the existing CSS instead of introducing yet another one? We want the styles to be maintainable in the long term and this is not a way to do that...

@lgtm-com
Copy link

lgtm-com bot commented Feb 9, 2021

This pull request introduces 1 alert when merging 4d8f211 into 72bce53 - view on LGTM.com

new alerts:

  • 1 for Syntax error

weblate_web/templates/user.html Show resolved Hide resolved
if (
not self.hosted_subscriptions.exists()
and not self.shared_subscriptions.exists()
):
Copy link
Member

Choose a reason for hiding this comment

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

Seems you've messed up the indentation fully here. Mixing tabs and spaces makes my Python reject loading the module completely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, let me check it again.

@@ -4032,71 +4033,501 @@ input.fullwidth {
}
}

/* Your Weblate Team - About Us */
.testimonial {
Copy link
Member

Choose a reason for hiding this comment

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

Please remove testimonial CSS from this branch...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay

max-height: 267px;
max-width: 192px;
float: left;
-webkit-transform: scaleX(-1);
Copy link
Member

Choose a reason for hiding this comment

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

Please use transform directly, it seems well supported these days (https://developer.mozilla.org/en-US/docs/Web/CSS/transform).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, let me change it.

@@ -1,6 +1,6 @@
{% load i18n %}
<section class="bottom {{ extra_css }}">
<div class="row">
<div class="row donation-box-updated">
Copy link
Member

Choose a reason for hiding this comment

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

Please revert this change and do it in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have already changed that Michal, i haven't created separate PR yet. I am trying to fix the support boxes using flex and once i am done, i will create a separate PR for that.

padding-top: 22px !important;
}

.style6 > div {
Copy link
Member

Choose a reason for hiding this comment

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

Can we please have reasonable class names? "style6" really doesn't tell anything on how it is being used. Somebody will look at your code few years later and should be able to understand it and having descriptive names really helps in this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right. I apologize for this, i will change it.

@nijel nijel mentioned this pull request Feb 16, 2021
4 tasks
@nijel
Copy link
Member

nijel commented Feb 16, 2021

Rebasing it on current master so that it can be merged is a good start.

Also, the indentation still seems wrong...

@muzammalrahim
Copy link
Contributor Author

Rebasing it on current master so that it can be merged is a good start.

Also, the indentation still seems wrong...

Can you please mention the part where indentation seems to be wrong?

@nijel
Copy link
Member

nijel commented Feb 16, 2021

In the models.py, see https://github.com/WeblateOrg/website/pull/474/files - there is a bunch of errors listed. Most of that (if not all) can be fixed by using pre-commit, it will do the correct formatting if the code is syntactically correct.

@muzammalrahim
Copy link
Contributor Author

In the models.py, see https://github.com/WeblateOrg/website/pull/474/files - there is a bunch of errors listed. Most of that (if not all) can be fixed by using pre-commit, it will do the correct formatting if the code is syntactically correct.

In the models.py, see https://github.com/WeblateOrg/website/pull/474/files - there is a bunch of errors listed. Most of that (if not all) can be fixed by using pre-commit, it will do the correct formatting if the code is syntactically correct.

Yes, i know. I was wondering if you want me to create a new Pull Request for those changes or do you want me to commit in this branch?

@nijel
Copy link
Member

nijel commented Feb 16, 2021

It really doesn't matter, whatever is easier for you to produce a pull request which can be merged.

@muzammalrahim
Copy link
Contributor Author

It really doesn't matter, whatever is easier for you to produce a pull request which can be merged.

Okay, i got it. I will be creating a new PR which hopefully will be easier to merge.

Copy link
Member

@nijel nijel left a comment

Choose a reason for hiding this comment

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

I've just again reviewed this pull request and here is a summary of issues I see. Most of them have been already mentioned several times during the review:

  • Conflicts with current master branch
  • Changes in non-related parts of code (for example comment removal as first line of the diff)
  • Duplication of the testimonial CSS
  • Poorly named CSS classes (med1, med2, style2, style3, ...)

@muzammalrahim
Copy link
Contributor Author

i am checking these issue

@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #474 (9e30870) into master (f5d1888) will increase coverage by 0.03%.
The diff coverage is 81.81%.

@@            Coverage Diff             @@
##           master     #474      +/-   ##
==========================================
+ Coverage   83.53%   83.57%   +0.03%     
==========================================
  Files          26       27       +1     
  Lines        2484     2490       +6     
  Branches      253      253              
==========================================
+ Hits         2075     2081       +6     
  Misses        315      315              
  Partials       94       94              

@nijel nijel changed the base branch from master to future March 1, 2021 11:50
@nijel nijel merged commit e88558c into WeblateOrg:future Mar 1, 2021
@nijel nijel mentioned this pull request Mar 1, 2021
5 tasks
@nijel
Copy link
Member

nijel commented Mar 1, 2021

Thanks. I've merged this, but I'm fixing things requested in #474 (review) in #517

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.

3 participants