Skip to content

OpenSource.org | Post top margin causing display issues #92

Closed

Description

@toncijajic

A margin-top: -350px; was causing the top of the post to move "out of the page", we need to investigate why it happened.

Details

This bit of code was forcing the post out of page (screenshot: https://d.pr/i/QUAFjl):

I fixed it temporarily by unsetting it via custom CSS:

/*2024-06-14 Tonci #8330205 temporary to solve top margin*/

.post .post--content {
    margin-top: unset;
}

However, that code has been there since August 2023, so something else must've changed to cause this issue.

We should investigate what and fix it.

Activity

  1. geoffguillain commented on Jun 15, 2024

    @geoffguillain

    Hey @toncijajic

    I have been able to identify when the issue has been introduced (Fev, 21st):
    PR (dev): #52 | PR (prod): #56

    Before this pull request, blog posts used to have featured images. The post was displayed to overlap the image, hence the negative margin.

    Here is a screenshot from my local environment before this PR with dummy content:
    image

    Since the theme does not use the feature image, we don't need this negative margin anymore.

    I can remove it from the template's stylesheets if that works for you.

    Extra

    While investigating this issue, I have done a small Q/A and I have monitored 2 issues:

    1. On all pages: when we hide the main navigation, the content loses the height of the navigation, and the content "jumps" up ~100 pixels. We should counterbalance when the navigation is hidden by adding the navigation's height as the top margin for content.
    2. On Chrome (and slightly on Firefox) Blog archive page is having some trouble when the navigation is hidden. The navigation is flickering before disappearing. A class is added while the header is resized after some scrolling down on small devices. File responsible for this: https://github.com/OpenSourceOrg/dotOrg/blob/09f69dfdc1984847a27182801844791475840af5/themes/osi/assets/js/src/theme/header-resize.js

    Please take a look at my feedback and let me know how you want to move forward.

  2. toncijajic commented on Jun 17, 2024

    @toncijajic
    Author

    @geoffguillain it feels weird the navigation is disappearing, it should follow the user scrolling down.
    Could it be a bug? Would it be easy to fix?

  3. geoffguillain commented on Jun 18, 2024

    @geoffguillain

    Hey @toncijajic

    This was done on purpose on large screens:

    /* Ensures the small header is hidden on larger screens */
    .header-main-small {
    display: none;
    }

    The header is transforming to a minimized version, this can be seen on mobile. When it is happening on the desktop the menu is hidden. By the way, the styles of this minimized version of the header are not desktop-ready, cf. screenshot.
    If you want to keep the header visible at all times, we will need to revert the styles to the non-minimized version on large screens, or design something specific.

    image

    Could you please double-check that you want to re-enable the sticky header on large screens and some directions about the expected output if so?

  4. geoffguillain commented on Jun 18, 2024

    @geoffguillain

    Hey @toncijajic,

    I have created a PR for the original request. The blog posts on the develop server are fixed:
    https://open-source-initiative-development.mystagingwebsite.com/blog/open-source-ai-definition-weekly-update-mar-11

    Please have a look, and let me know if I can merge this to production.

  5. toncijajic commented on Jun 18, 2024

    @toncijajic
    Author

    Thanks for the info @geoffguillain!

    This was done on purpose on large screens:

    Very weird.

    Could you please double-check that you want to re-enable the sticky header on large screens and some directions about the expected output if so?

    Yup, I'll confirm this shouldn't be happening.

    Please have a look, and let me know if I can merge this to production.

    Will do once I confirm with the partner that the print preview they use is working correctly, too.

  6. toncijajic commented on Jun 20, 2024

    @toncijajic
    Author

    @geoffguillain we're seeing some issues with H1 headings disappearing on the pages.

    Examples:

    Could you spin up these changes on a fresh production clone so we can remove the environment variables and know what to fix?

  7. geoffguillain commented on Jun 21, 2024

    @geoffguillain

    Hey @toncijajic

    Could you spin up these changes on a fresh production clone so we can remove the environment variables and know what to fix?

    The issue is not the staging server but the repo. Some commits/PR has been pushed only to the production branch.

    I have cherry-picked the commits that I have found about the title and imported them to the develop branch. That should be enough for testing:
    https://open-source-initiative-development.mystagingwebsite.com/osd

    I would recommend archiving the current develop branch and creating a new one based on trunk to align both environments.
    Before doing so, it would be better if there is no pending work on develop before doing this. I can see some opened issues currently working on: https://github.com/OpenSourceOrg/dotOrg/issues

  8. toncijajic commented on Jun 23, 2024

    @toncijajic
    Author

    @geoffguillain, thanks for the analysis!

    Give us a day to get our ducks in a row and we'll ping back on the next steps.

  9. xpurichan commented on Jun 25, 2024

    @xpurichan

    @geoffguillain I've assessed the open issues:

    1. Blog Posts should display the date published rather than the last modified date. #93 - active work in progress
    2. OpenSource.org | Post top margin causing display issues #92 - this issue
    3. Add Donation Widget on the site #71 - awaiting partner feedback, prolonged delay
    4. SugarCalendar: Recurrence shows the wrong information on the front end #55 - irrelevant since the partner has moved to another events solution
    5. SugarCalendar - Link not being added to the ics #34 - irrelevant since the partner has moved to another events solution

    With this in mind, it sounds like we should wait for #93 to be completed (hopefully within a day or so). I can also communicate with the partner that we require a response and closure on #71 in order to move forward with this.

    Let me know if that's a good plan of action for you.

  10. xpurichan commented on Jun 27, 2024

    @xpurichan

    👋 @geoffguillain checking back in with you on this ⬆️

  11. geoffguillain commented on Jun 28, 2024

    @geoffguillain

    Hey @xpurichan

    #93 - The extra requests have been solved and pushed to production

    Looking at the other linked issues, I do not see comments about code living in development.

    I assume we could:

    1. merge this issue OpenSource.org | Post top margin causing display issues #92 to production
    2. Create a new 'clean' develop branch from the trunk (production) branch for future work.
      The old develop branch can be renamed (archived), and legacy code would still be available there if needed.

    Let me know if you have any questions.

  12. xpurichan commented on Jun 28, 2024

    @xpurichan

    @geoffguillain , let's move forward with that. I do see #71 getting some attention now, so we'll notify them there once the change is made.

  13. geoffguillain commented on Jul 1, 2024

    @geoffguillain

    Hey @xpurichan

    Issue

    Branches

    image

    Please take a look and let me know if you have any questions.

  14. toncijajic commented on Jul 1, 2024

    @toncijajic
    Author

    @geoffguillain thanks! Good idea to also redo the development site, so it's all new?

  15. geoffguillain commented on Jul 2, 2024

    @geoffguillain

    @toncijajic
    I would say not mandatory since the behaviors should not be identical. But if you need to align the production database with the development one feel free to also reset the develop site itself.

  16. toncijajic commented on Jul 10, 2024

    @toncijajic
    Author

    @geoffguillain let's merge this to prod if not merged already, and we can close it.

  17. geoffguillain commented on Jul 10, 2024

    @geoffguillain

    Code in this issue has been merged to prod

  18. toncijajic commented on Jul 11, 2024

    @toncijajic
    Author

    Neat, closing - thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions