PricingBlog

Adding my own Package to a Project breaks the Page

  • the_guy01-1226466818374242345

    the_guy

    1 year ago

    I created the ps-table package based on a Table that I had in my Project.
    Now when I try to swap the original table in that project for my package - the page breaks.

    I added a picture of the page without my ps-table component and the second one is where I added the component.

    The original tables now get broken too, my header looses CSS, font turns black
    The weird thing is in the editor the Page looks fine even after the Component is added.
    1226466819074949260-Screenshot_2024-04-07_at_13.37.12.png
    1226466819703836702-Screenshot_2024-04-07_at_13.37.38.png
    1226466820312268841-Screenshot_2024-04-07_at_13.37.49.png
    1226466821788663819-Screenshot_2024-04-07_at_13.38.58.png
    1226466821356392519-Screenshot_2024-04-07_at_13.38.14.png
    1226466820802871438-Screenshot_2024-04-07_at_13.37.58.png
  • Nothing in the console logs either:

    Page with the problem is:
    https://dev-ngaffiliate.toddle.site/team
  • erikbeus-1226472577141047376

    Erik Beuschau

    1 year ago

    That sounds strange. I’ll have a look at this issue tomorrow and get back to you
  • erikbeus-1226874923943858269

    Erik Beuschau

    1 year ago

    I had a look, and I can reproduce some of the styling issues - specifically in the footer of your table. It seems that your style variant for <670px takes effect even when the window is larger than that. I'll investigate that further.
    I could not reproduce the issue where font styling changes after inserting the pstable component. Could you perhaps try to reproduce the issue in a small separate project I can look at? 🤞

    Also, I noticed that your JSON encoding the path in your columns attribute. I believe it should be possible to pass an array without encoding it?
  • the_guy01-1226916793793384549

    the_guy

    1 year ago

    Sure let me try to reproduce in a cloned project and invite you, whats you username?
  • I am not sure if it works without encoding, I fiddled arround quiet a bit but it wasnt workung until I used JSON encoding so I just went with that
  • erikbeus-1226948143225241732

    Erik Beuschau

    1 year ago

    My username is god_of_code 🙂
  • the_guy01-1226955816108691537

    the_guy

    1 year ago

    I have invited you to the project:
    debug_table

    You will find to pages - exactly the same except one does not contain the ps-table component.

    If you remove the ps-table component from "nga-list-team" the problem is fixed on the page without error -thats how you can replicate it.
    👍1
  • 1226955965761454191-Screenshot_2024-04-08_at_22.04.27.png
    1226955966197792929-Screenshot_2024-04-08_at_22.04.34.png
  • erikbeus-1227549559887106129

    Erik Beuschau

    1 year ago

    I think I found the issue. On the actual table element in the ps-table component, the CSS is invalid (see screenshot).
    If you want to style the last child of an element specifically, you should apply the styling on that element using a style variant (see other screenshot).
    Since the CSS had an opening bracket, it meant that it changed the scope for some of the other CSS on the rendered page. Obviously, we should not allow that to happen, but for now you should be able to fix the issue by removing the last-child styling from your CSS editor on the table element 🤞
    Please let me know if it works (and if it makes sense 😅 )
    1227549559455219794-Screenshot_2024-04-10_at_11.19.32.png
    1227549559723524187-Screenshot_2024-04-10_at_11.21.50.png
  • the_guy01-1228789128469155910

    the_guy

    1 year ago

    I removed the last-child styling and it displays correctly now - thanks for checking in 🙏🏻
    🙌1