jazzy
jazzy copied to clipboard
Source code alignment issue in swift.
Hi Jazzy Team,
We are very much happy on jazzy eased our work for documenting Objective-C and Swift code. We are making use of the awesome features that jazzy offers.
I would like to bring it to your notice on some minor changes with respect to swift code documentation. Please find the attached snapshot herewith which depicts the support needed.

Could you please provide support for aligning the text and formatting it to the page fit? Because if you look at the function as attached, it's too long and in order to see the swift code, we need to scroll horizontally to see the full definition, it looks awesome in Objective-C though.
Could you please let us know if this can be addressed in coming versions?
Thank you, Ramachandra V N.
Also for reference the link for the docs in the image is:
http://pyze.com/api/iOS/Classes/Pyze.html#/c:objc(cs)Pyze(cm)showInAppNotificationUI:forDisplayMessages:msgNavBarButtonsTextColor:msgNavBarButtonsBgColor:msgNavBarBgColor:msgNavBarCounterTextColor:withDelegate:
Based of looking at Apple's new docs (https://developer.apple.com/reference/uikit/uiview/1622418-animatewithduration), they are creating manual line split at render time based on the browser width.

This is going to be VERY hard to manually recreate at template rendering time unless we know the size of the users browser window. We could make a blanket rule that all Swift function declaration get arguments split across multiple lines, but that would make a mess of a LOT of other declarations.
This will take some more thinking, but the best solution might be a React based theme ala #605.
@vnramachandra Have you tried running jazzy with the default theme? How does the output alignment compare? Would this be a better option for you use case?
@agentk If I used default theme [apple], the content sometimes get's clipped, so I am using 'fullwidth'.
I’ve created a theme that looks very similar to the Apple doc (as of Aug 2016). I actually only changed the CSS, but to make it easier, I went ahead and made it its own theme. You can find it here.
https://github.com/lloydsargent/JazzyThemeMod
It is set to wrap on full words. So you get something like this:
agentk: This is going to be VERY hard to manually recreate at template rendering time unless we know the size of the users browser window.
It isn’t “hard” just tedious and a lot of unfun - I had to make my website responsive and, NOT being a CSS guru I did it - but not without a whole lot of profanity. From iPhone to Desktop, it works, but I really do not like CSS.