Skip to content
Snippets Groups Projects

Mobile notifications in nav bar, separate mobile navbar to its own component

Merged Shpuld Shpludson requested to merge feature/mobile-improvements-3 into develop
1 unresolved thread

The notifs button in the navbar opens a drawer from the right, closing the drawer marks notifications as read. With this change going between notifications/timeline/post-status is done with just one tap again without losing state in any of these. you don't even lose scroll position when you just want to check notifications, at the cost of some minor awkwardness when you try to over-scroll the notifications.

Some remaining awkwardness to be fixed:

  • gesture support for the drawer [DONE, for closing only, adding opening for both left side drawer and right notifications drawer by swipe shouldn't be too hard now but not going to do it here]
  • loading more notifications on scroll to make it harder to overscroll [wontfix here]

One slightly questionable but also really useful change: keeping track of mobile layout in JS as well so you can actually do logic based on the layout. this was done here to avoid having 2 notifications components at the same time

Screen_Shot_2019-03-23_at_22.26.26Screen_Shot_2019-03-23_at_22.26.33

Edited by Shpuld Shpludson

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • HJ
  • HJ
    HJ @hj started a thread on the diff
  • 33 },
    34 sitename () { return this.$store.state.instance.name }
    35 },
    36 methods: {
    37 toggleMobileSidebar () {
    38 this.$refs.sideDrawer.toggleDrawer()
    39 },
    40 openMobileNotifications () {
    41 this.notificationsOpen = true
    42 },
    43 closeMobileNotifications () {
    44 if (this.notificationsOpen) {
    45 // make sure to mark notifs seen only when the notifs were open and not
    46 // from close-calls.
    47 this.notificationsOpen = false
    48 this.markNotificationsAsSeen()
    • Maintainer

      not suuuuure... i'd probably want it optional but could be done in a separate MR

    • Author Maintainer

      well it's mobile only, and not needing a separate read button is nice

    • Maintainer

      idk, i'l love to keep something as unread so that i don't forget it later, but tools are just arent there right now...

    • Please register or sign in to reply
  • Maintainer

    overall looks good and works good on my shitfirefox for shitdroid

  • added 1 commit

    • 2879495b - remove window width copypasta

    Compare with previous version

  • Shpuld Shpludson added 33 commits

    added 33 commits

    Compare with previous version

  • Shpuld Shpludson added 6 commits

    added 6 commits

    Compare with previous version

  • mentioned in commit ac28e8c2

  • Please register or sign in to reply
    Loading