Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    BlindDespair
    @BlindDespair
    Both issues happen in TransferStateService as I figured out
    BlindDespair
    @BlindDespair
    ok, I found what the issues are and managed to fix both
    I am gonna file these issues on github and submit a PR for both
    BlindDespair
    @BlindDespair
    Sander Elias
    @SanderElias
    @BlindDespair thanks for the work.
    @MarcHochleutner-Koellisch One way is to use Sam's plugin that removes angular from the result files.
    The downsite of that is, that there is no more SPA, but only a real static site. (which is also the upside!)
    The Smiley plugin only makes real sense for content(blog) pages, as those are not rerendered by the SPA.
    Doug Schnelzer
    @dschnelzer
    Hi there, I enjoyed watching a few videos about Scully yesterday and learning about it. Strongly considering using it for a client project. One question I couldn't find an answer to is how does the static generation process supports responsive design. When Puppeteer, scans the Angular app, can you control the screen width to determine if the rendering is for a mobile or desktop view? When the static version loads, I'm assuming it will show the static mobile or desktop view and then become responsive when the Angular code loads. Would a user potentially see a "jump" from one view to another? Let me know if I'm missing something. Thanks much for your hard work. It's very interesting.
    BlindDespair
    @BlindDespair
    It will become responsive based on your styles, which are anyway static, so even if you disable javascript completely it will be still responsive thanks to the css
    Sander Elias
    @SanderElias
    @dschnelzer I agree with @BlindDespair The CSS should take care of that, and the html stays the same.
    If you need more, we need to talk tho.
    msacket
    @msacket
    @dschnelzer The key, as @BlindDespair mentioned, is to make sure your responsiveness doesn’t rely on JavaScript. One thing to note is there can be a rerendering flash as the static html is rendered first… and then the angular app rerenders the content when it loads. In my experience, this is mitigated by adding the initialNavigation: "enabled" flag to your router configuration like this:
    RouterModule.forRoot(routes, { initialNavigation: 'enabled’} )
    Peter B Smith
    @peterbsmith2
    @SanderElias @zoitsa we are hitting a contradiction as we are building the contentful plugin

    trying to have the plugin return something like:

      return [{
        route: '',
        type: 'contentful'
      }];

    seeems correct

    yet because contentful' is not in the RouteTypes enum, it is not valid
    Doug Schnelzer
    @dschnelzer
    Thanks for the guidance supporting responsive design. Making sure that CSS is controlling all responsive features makes sense. Thanks for the Angular routing tip too.
    Sander Elias
    @SanderElias
    @peterbsmith2 Did you register your plugin?
    One it is registered, it will be available.
    registerPlugin('router','contentful',myPlugin,myValidationFunc)
    Peter B Smith
    @peterbsmith2
    I'm talking about in the definition of the plugin...like...
    export const contentfulRoutePlugin = async (route: string, conf): Promise<HandledRoute[]> => {
      return [{
        route: '',
        type: 'contentful'
      }];
    }
    Sander Elias
    @SanderElias
    Ah, yes, but that should not be a problem?
    Peter B Smith
    @peterbsmith2
    Type ""contentful"" is not assignable to type 'RouteTypes'
    Sander Elias
    @SanderElias
    That sounds like a there is an old type being used.
    the new type should have type: string
    I had to flex that defention, because there is no way you can extend an enum in hte way we need to make this work.
    Peter B Smith
    @peterbsmith2
    Then does that imply I am working with an outdated @scullyio/scully package?
    Sander Elias
    @SanderElias
    Perhaps, or you are using a type we forgot to clean up.
    Peter B Smith
    @peterbsmith2
    which is the latest deployed version of @scullyio/scully?
    i'm working with 0.0.72
    Peter B Smith
    @peterbsmith2
    npm i -S @scullyio/scully@latest gives me 0.0.72 again
    so it appears there is a type sculyl has not cleaned up
    Sander Elias
    @SanderElias
    I'll look into it.
    msacket
    @msacket
    I’d guess it has something to do with Lines 44-46 as well. https://github.com/scullyio/scully/blob/master/scully/utils/interfacesandenums.ts#L44-L46
    Sander Elias
    @SanderElias
    There seems to be a regression there. I'll fix it.
    Or feel free to a PR ;)
    Peter B Smith
    @peterbsmith2
    i can PR
    it appears simple to change type to string
    Sander Elias
    @SanderElias
    Yes, that is all it is.
    Peter B Smith
    @peterbsmith2
    additionally removing the enum would seem appropriate, agree?
    i'll have a PR up in a couple minutes
    Sander Elias
    @SanderElias
    I do agree, but it might be still in use somewhere. as goes for the other type @msacket just annotated.
    There were some actual plans around those types that just were not meant to be with current TS.
    Peter B Smith
    @peterbsmith2
    basic :neutral_face:
    Sander Elias
    @SanderElias
    I'll merge as the test are passing.
    Thanks for your big help @peterbsmith2 :-D
    Peter B Smith
    @peterbsmith2
    you're welcome