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

Bug/59916 on narrow screens (including mobile) the view always scrolls to the activity #17617

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

jjabari-op
Copy link
Collaborator

Ticket

  • the described issue is resolved and covered with a spec
  • I've encountered another scroll behavior on screens below 550px, which seems not to be related to the implementation of the activity tab (-> happens for files/other tabs as well): The page scrolls down around 700px on page load on these small screens. I didn't find the reason for that

@jjabari-op jjabari-op self-assigned this Jan 15, 2025
@jjabari-op jjabari-op requested a review from akabiru January 15, 2025 15:14
Copy link
Member

@akabiru akabiru left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏾 Just one resolution and should be good after.

Comment on lines +966 to +986
context "when on mobile screen size" do
before do
page.current_window.resize_to(500, 1000)
# simulate a mobile screen size
# the height in this spec is important as the activity tab must be visible
# otherwise the (in this case undesired) auto scrolling would not be triggered

wp_page.visit!
wp_page.wait_for_activity_tab
end

# this one is actually failing, but it's not caused by the activity tab
# the scroll position is at around 700, some other part of the frontend code seems to trigger a scroll
# happens for the files tab as well for example
#
# it "does not scroll to the bottom when the newest journal entry is on the bottom", :aggregate_failures do
# sleep 1 # wait for a potential auto scrolling to finish
# # expect activity tab not to be visibe, as the page is not scrolled to the bottom
# scroll_position = page.evaluate_script("document.querySelector(\"#content-body\").scrollTop")
# expect(scroll_position).to eq(0)
# end
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 instead mark the context with an RSpec pending statement - linking to the work package to resolve this: https://community.openproject.org/work_packages/60638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants