-
Notifications
You must be signed in to change notification settings - Fork 239
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
Improvement/subscription date in profile #733
Conversation
пока делал заметил, что profile-respect тэг не описан в css. Можно убрать или открыть отдельный issue?
|
users/models/user.py
Outdated
return round(self.membership_created_days() / 30) | ||
|
||
def gmembership_created_years(self): | ||
return round(self.membership_created_days() / 365) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эти новые функции прям так необходимы? Кажется, что если мы стали лепить их на каждый чих, мы далем что-то не так
There was a problem hiding this comment.
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 и от нее расчитывать остальное.
users/views/friends.py
Outdated
|
||
@auth_required | ||
def friends(request, user_slug): | ||
# TODO: what to do if user tries to see someones friends |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не показывать эту страницу значит
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Замерджу с #723, @ollkostin сделал страницу 403 для этого кейса
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Покажи плиз скриншотов еще как это выглядит. Особенно интересует новая плашка в профиле
users/models/user.py
Outdated
def membership_created_months(self): | ||
return round(self.membership_created_days() / 30) | ||
|
||
def gmembership_created_years(self): |
There was a problem hiding this comment.
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
Хах, а почему их две-то? В своём профиле будет своя, в чужом чужая, но две никогда не может быть, это же даже выглядит смешно :D |
Идея была оставить и там и там по 4 пункта вроде бы. Если заметки не хочется сразу делать, можно три, кто-то потом доделает |
Получается, в своем и чужом будет 4 пункта: плюсы, количество времени в кубе, мои чуваки и заметки? А куда еженедельный журнал, бот и подписка уйдут? |
В своём: плюсики, остаток членства, журнал, бот В чужом: плюсики, возраст членства, чуваки и заметки |
Давай в отдельном, чтобы этот быстрее замержить. Посмотрю на днях |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Добавил от себя последних фиксов, будем мержить, заметки давай делать уже поверх, там как раз место под четвертую кнопку осталось
Для ссылки "Мои чуваки" в своем профиле надо будет смержить экраны нотификаций и дайджеста, чтобы "Бот активен" превратилось в одну кнопку "Бот и журнал активен", а слева от нее появилась новая
А что с #723, его тоже бы закрыть? Перед мерджем хотел гит историю поправить, а то Fixes typo and suggestions for PR не очень |
Гит-историю нет смысла править, у нас Squash and merge. Тот issue пока не закрываем, фичу-то не сделали, только блок отрефакторили |
* 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>
* 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>
* 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>
* 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>
#504, #723
Время членства выводится по нарастающей в зависимости от количества дней в клубе. Мне кажется, так чище чем выводить все сразу дни/недели/месяцы/годы.