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

Improvement/subscription date in profile #733

Merged

Conversation

kedMertens
Copy link
Contributor

#504, #723
Время членства выводится по нарастающей в зависимости от количества дней в клубе. Мне кажется, так чище чем выводить все сразу дни/недели/месяцы/годы.

@kedMertens kedMertens marked this pull request as ready for review October 12, 2021 18:45
@kedMertens
Copy link
Contributor Author

kedMertens commented Oct 12, 2021

пока делал заметил, что profile-respect тэг не описан в css. Можно убрать или открыть отдельный issue?

<div class="profile-status profile-respect">

return round(self.membership_created_days() / 30)

def gmembership_created_years(self):
return round(self.membership_created_days() / 365)
Copy link
Owner

Choose a reason for hiding this comment

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

Эти новые функции прям так необходимы? Кажется, что если мы стали лепить их на каждый чих, мы далем что-то не так

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Думал сделать подобно membership_days_left.
Наверное, ты прав, скорее всего эти функции будут использоваться только в одном месте.
Можно сделать одну membership_created_days и от нее расчитывать остальное.


@auth_required
def friends(request, user_slug):
# TODO: what to do if user tries to see someones friends
Copy link
Owner

Choose a reason for hiding this comment

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

Не показывать эту страницу значит

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Замерджу с #723, @ollkostin сделал страницу 403 для этого кейса

Copy link
Owner

@vas3k vas3k left a comment

Choose a reason for hiding this comment

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

Покажи плиз скриншотов еще как это выглядит. Особенно интересует новая плашка в профиле

def membership_created_months(self):
return round(self.membership_created_days() / 30)

def gmembership_created_years(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

опечатка gmembership_created_years -> membership_created_years

@kedMertens
Copy link
Contributor Author

Покажи плиз скриншотов еще как это выглядит. Особенно интересует новая плашка в профиле
Screenshot 2021-10-15 at 18 11 00
Screenshot 2021-10-15 at 18 10 34
Screenshot 2021-10-15 at 18 10 14
Screenshot 2021-10-15 at 18 08 35

@vas3k
Copy link
Owner

vas3k commented Oct 15, 2021

Хах, а почему их две-то? В своём профиле будет своя, в чужом чужая, но две никогда не может быть, это же даже выглядит смешно :D

@kedMertens
Copy link
Contributor Author

вот так в чужом
Screenshot 2021-10-15 at 18 21 09

тогда в своем все в одну полоску?

@vas3k
Copy link
Owner

vas3k commented Oct 15, 2021

Идея была оставить и там и там по 4 пункта вроде бы. Если заметки не хочется сразу делать, можно три, кто-то потом доделает

@kedMertens
Copy link
Contributor Author

Идея была оставить и там и там по 4 пункта вроде бы. Если заметки не хочется сразу делать, можно три, кто-то потом доделает

Получается, в своем и чужом будет 4 пункта: плюсы, количество времени в кубе, мои чуваки и заметки? А куда еженедельный журнал, бот и подписка уйдут?

@vas3k
Copy link
Owner

vas3k commented Oct 16, 2021

В своём: плюсики, остаток членства, журнал, бот

В чужом: плюсики, возраст членства, чуваки и заметки

@kedMertens
Copy link
Contributor Author

Поправил, заметки тоже хочу сделать, открыть новый PR или можно тут?

Screenshot 2021-10-21 at 20 37 41
Screenshot 2021-10-21 at 20 37 34

@vas3k
Copy link
Owner

vas3k commented Oct 21, 2021

Давай в отдельном, чтобы этот быстрее замержить. Посмотрю на днях

Copy link
Owner

@vas3k vas3k left a comment

Choose a reason for hiding this comment

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

Добавил от себя последних фиксов, будем мержить, заметки давай делать уже поверх, там как раз место под четвертую кнопку осталось

Для ссылки "Мои чуваки" в своем профиле надо будет смержить экраны нотификаций и дайджеста, чтобы "Бот активен" превратилось в одну кнопку "Бот и журнал активен", а слева от нее появилась новая

@kedMertens
Copy link
Contributor Author

А что с #723, его тоже бы закрыть? Перед мерджем хотел гит историю поправить, а то Fixes typo and suggestions for PR не очень

@vas3k
Copy link
Owner

vas3k commented Oct 23, 2021

Гит-историю нет смысла править, у нас Squash and merge. Тот issue пока не закрываем, фичу-то не сделали, только блок отрефакторили

@vas3k vas3k merged commit f9673af into vas3k:master Oct 23, 2021
@kedMertens kedMertens deleted the improvement/subscribtion_date_in_profile branch October 23, 2021 10:44
@kedMertens kedMertens mentioned this pull request Oct 23, 2021
2 tasks
glader pushed a commit to glader/4aff.club that referenced this pull request Nov 1, 2021
* Add friends page vas3k#723

* Adds subscription status to profile

* send 403 if user tries to look someones friends vas3k#723

* bring back old name for add to friends button vas3k#723

* Fixes typo, covers PR suggestions

* Visual improvements

Co-authored-by: ollkostin <ollkostin@gmail.com>
Co-authored-by: kedMertens <kedmail@pm.me>
Co-authored-by: vas3k <me@vas3k.ru>
vas3k added a commit that referenced this pull request Nov 7, 2021
* cleanup: remove "pain" post type (#742)

* Убран тип поста Боль

* Фикс миграции

Co-authored-by: Mikhail Polykovskij <mikhail.polykovskiy@x5.ru>

* Increase "ban_reason" length

* Disable comments auto-subscription

* feat: Badges (#704)

* Badges draft

* Badges CSS for comments, posts, profiles

* Almost done, needs data and icons

* CSS fixes + frontend bugs

* More logical fixes

* Fixing bugs, rename things

* Add icons and initial data

* fix: badge notifications + typos

* feat: show subscription duration in profile  (#733)

* Add friends page #723

* Adds subscription status to profile

* send 403 if user tries to look someones friends #723

* bring back old name for add to friends button #723

* Fixes typo, covers PR suggestions

* Visual improvements

Co-authored-by: ollkostin <ollkostin@gmail.com>
Co-authored-by: kedMertens <kedmail@pm.me>
Co-authored-by: vas3k <me@vas3k.ru>

* feat: Remove sending limits for friend's comments

* Threads now public

* Fix #753. Add badges to /stats/ page

* fix: Increase latest_badges on stats to 20

* Add "align-items: center;" to stats/badges

* feat: exclude replies from friends notifications

* fix: bad gradient of badges block (#760)

Signed-off-by: Vitalii Dmitriev <dmitvitalii@gmail.com>

* Add highlight to badged comments, improve CSS

* Cooking achievements (#755)

* Draft for cooking achievements

* Fixing bg color and using proper URLs

* Fixing pictures order

* Fixing pastry_cook_2

* feat: add socialism and anarchism to list of tags (#637)

А то сейчас доступны три правые системы взглядов и ни одной левой 🤔

* feat: remove "libertarianism" and "anarchism" tags

* fix: mobile CSS bugs

* feat: remove expertise from profile, move achievements

* fix #764: "show all posts" link in profile is wrong

* feat: remove NLTK dependency + add test docker build step

* fix #714: add login button to public pages (#763)

* add login button

* fix css

* fix url

* fix css justify

* Refactor daily and weekly digest renderers

* Remove old supervisor config

* fix: use sum of prices for top badges page

* Add data archives cleanup to crontab

* fix #765: css padding for upvote button

* Upstream

* Makefile

* Docker deploy

* Фикс CI

* Сборка из указанного тега

* Права на крон

* Prepare for test deployment

Co-authored-by: Mikhail Polykovskij <mikhail.polykovskiy@x5.ru>
Co-authored-by: vas3k <me@vas3k.ru>
Co-authored-by: kedMertens <39831696+kedMertens@users.noreply.github.com>
Co-authored-by: ollkostin <ollkostin@gmail.com>
Co-authored-by: kedMertens <kedmail@pm.me>
Co-authored-by: Vitalii Dmitriev <dmitvitalii@gmail.com>
Co-authored-by: Dmitry Kochkin <cooch@mail.ru>
Co-authored-by: Ivan Mir <ivmirx@users.noreply.github.com>
Co-authored-by: Kamil <babaevkamil@gmail.com>
Co-authored-by: Vasily Zubarev <vasily@parity.io>
vas3k added a commit that referenced this pull request Dec 29, 2021
* cleanup: remove "pain" post type (#742)

* Убран тип поста Боль

* Фикс миграции

Co-authored-by: Mikhail Polykovskij <mikhail.polykovskiy@x5.ru>

* Increase "ban_reason" length

* Disable comments auto-subscription

* feat: Badges (#704)

* Badges draft

* Badges CSS for comments, posts, profiles

* Almost done, needs data and icons

* CSS fixes + frontend bugs

* More logical fixes

* Fixing bugs, rename things

* Add icons and initial data

* fix: badge notifications + typos

* feat: show subscription duration in profile  (#733)

* Add friends page #723

* Adds subscription status to profile

* send 403 if user tries to look someones friends #723

* bring back old name for add to friends button #723

* Fixes typo, covers PR suggestions

* Visual improvements

Co-authored-by: ollkostin <ollkostin@gmail.com>
Co-authored-by: kedMertens <kedmail@pm.me>
Co-authored-by: vas3k <me@vas3k.ru>

* feat: Remove sending limits for friend's comments

* Threads now public

* Fix #753. Add badges to /stats/ page

* fix: Increase latest_badges on stats to 20

* Add "align-items: center;" to stats/badges

* feat: exclude replies from friends notifications

* fix: bad gradient of badges block (#760)

Signed-off-by: Vitalii Dmitriev <dmitvitalii@gmail.com>

* Add highlight to badged comments, improve CSS

* Cooking achievements (#755)

* Draft for cooking achievements

* Fixing bg color and using proper URLs

* Fixing pictures order

* Fixing pastry_cook_2

* feat: add socialism and anarchism to list of tags (#637)

А то сейчас доступны три правые системы взглядов и ни одной левой 🤔

* feat: remove "libertarianism" and "anarchism" tags

* fix: mobile CSS bugs

* feat: remove expertise from profile, move achievements

* fix #764: "show all posts" link in profile is wrong

* feat: remove NLTK dependency + add test docker build step

* fix #714: add login button to public pages (#763)

* add login button

* fix css

* fix url

* fix css justify

* Refactor daily and weekly digest renderers

* Remove old supervisor config

* fix: use sum of prices for top badges page

* Add data archives cleanup to crontab

* fix #765: css padding for upvote button

* Upstream

* Обновление интро подтвержденного юзера

Co-authored-by: Mikhail Polykovskij <mikhail.polykovskiy@x5.ru>
Co-authored-by: vas3k <me@vas3k.ru>
Co-authored-by: kedMertens <39831696+kedMertens@users.noreply.github.com>
Co-authored-by: ollkostin <ollkostin@gmail.com>
Co-authored-by: kedMertens <kedmail@pm.me>
Co-authored-by: Vitalii Dmitriev <dmitvitalii@gmail.com>
Co-authored-by: Dmitry Kochkin <cooch@mail.ru>
Co-authored-by: Ivan Mir <ivmirx@users.noreply.github.com>
Co-authored-by: Kamil <babaevkamil@gmail.com>
vas3k added a commit that referenced this pull request Feb 11, 2022
* cleanup: remove "pain" post type (#742)

* Убран тип поста Боль

* Фикс миграции

Co-authored-by: Mikhail Polykovskij <mikhail.polykovskiy@x5.ru>

* Increase "ban_reason" length

* Disable comments auto-subscription

* feat: Badges (#704)

* Badges draft

* Badges CSS for comments, posts, profiles

* Almost done, needs data and icons

* CSS fixes + frontend bugs

* More logical fixes

* Fixing bugs, rename things

* Add icons and initial data

* fix: badge notifications + typos

* feat: show subscription duration in profile  (#733)

* Add friends page #723

* Adds subscription status to profile

* send 403 if user tries to look someones friends #723

* bring back old name for add to friends button #723

* Fixes typo, covers PR suggestions

* Visual improvements

Co-authored-by: ollkostin <ollkostin@gmail.com>
Co-authored-by: kedMertens <kedmail@pm.me>
Co-authored-by: vas3k <me@vas3k.ru>

* feat: Remove sending limits for friend's comments

* Threads now public

* Fix #753. Add badges to /stats/ page

* fix: Increase latest_badges on stats to 20

* Add "align-items: center;" to stats/badges

* feat: exclude replies from friends notifications

* fix: bad gradient of badges block (#760)

Signed-off-by: Vitalii Dmitriev <dmitvitalii@gmail.com>

* Add highlight to badged comments, improve CSS

* Cooking achievements (#755)

* Draft for cooking achievements

* Fixing bg color and using proper URLs

* Fixing pictures order

* Fixing pastry_cook_2

* feat: add socialism and anarchism to list of tags (#637)

А то сейчас доступны три правые системы взглядов и ни одной левой 🤔

* feat: remove "libertarianism" and "anarchism" tags

* fix: mobile CSS bugs

* feat: remove expertise from profile, move achievements

* fix #764: "show all posts" link in profile is wrong

* feat: remove NLTK dependency + add test docker build step

* fix #714: add login button to public pages (#763)

* add login button

* fix css

* fix url

* fix css justify

* Refactor daily and weekly digest renderers

* Remove old supervisor config

* fix: use sum of prices for top badges page

* Add data archives cleanup to crontab

* fix #765: css padding for upvote button

* Upstream

* Логин под именем указанного пользователя

Co-authored-by: Mikhail Polykovskij <mikhail.polykovskiy@x5.ru>
Co-authored-by: vas3k <me@vas3k.ru>
Co-authored-by: kedMertens <39831696+kedMertens@users.noreply.github.com>
Co-authored-by: ollkostin <ollkostin@gmail.com>
Co-authored-by: kedMertens <kedmail@pm.me>
Co-authored-by: Vitalii Dmitriev <dmitvitalii@gmail.com>
Co-authored-by: Dmitry Kochkin <cooch@mail.ru>
Co-authored-by: Ivan Mir <ivmirx@users.noreply.github.com>
Co-authored-by: Kamil <babaevkamil@gmail.com>
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

3 participants