How to change DesktopThresholdWidth in Docusaurus? - docusaurus

Right now it seems like the desktop breakpoint is hard-coded to 996 (see here). Is there a way we could override this?

Related

Why Screen__m is applying from 769px not from 768 px in Magento2.4.4?

Anyone noticed that, #screen__m:768 variable applying from 769px, Because of in Magento2.4.4 lib file- 'responsive.less' file they have implemented like the picture.
Filepath: lib/web/css/source/lib/_responsive.less
But in the variable.less, they mentioned '#screen__m:768'. Because of this variable change, facing design-related issues after the upgrade into 2.4.4.
To resolve this we need to change the screen__m value -> screen__m:768px to screen__m:767px in our custom theme
I am not sure why they are changed for the iPad screen, If anyone knows, please share.

Footer/Header for CHTCollectionViewWaterfallFlowLayout?

With CHTCollectionViewWaterfallFlowLayout implemented, my viewForSupplementaryElementOfKind and referenceSizeForFooterInSection are not called.
This only happens with collectionViews that use CHTCollectionViewWaterfallFlowLayout. The library readme states that it supports header and footer, but not seem to be the case? Or am I missing something here?
https://github.com/chiahsien/CHTCollectionViewWaterfallLayout
I've tried opening an issue but haven't seen anything.
Thanks!

Resharper cannot resolve partial view inside master page

I've upgraded from ReSharper 7 on vs2012 pro to ReSharper 8.1 on vs2013 pro, and ReSharper is now warning me a lot of my partial views cannot be resolved.
It seems to be only happening:
In ASP master pages (i.e. not razor)
When the .ascx partial is in the same controller folder as the partial
E.g. Home.Master, located in ~/Views/Home/Home.Master renders UserProfile.ascx, located in ~/Views/Home/UserProfile.ascx.
Both <%: Html.RenderPartial("UserProfile") %> and <%: Html.RenderPartial("~/Views/Home/UserProfile.ascx"%> are flagged by ReSharper as invalid.
Additionally, shared partials in the ~/views/shared folder seem to be picked up fine when I reference just by name:
However, referencing the view by path doesn't seem to work:
(NB. Both images are taken inside Home.Master, in ~/Views/Home)
When I run the application, the partials work correctly, so it seems to be a change in ReSharper 8.1. Is there anything I can do to fix this?
It's a bug in ReSharper.
The best thing for now is to set it to ignore this type of error.
You can do this by selecting 'inspection options' from the 'red light bulb' on the left hand side and setting it to another option. Hopefully it will be fixed soon!
Edit: See this ticket for the problem. http://youtrack.jetbrains.com/issue/RSRP-395642
There's a simpler fix I've got around it by using relative references. So in my case I had a view in another project (and if you try to go outside of the current project without starting with a forward slash "/" you'll get a warning like this. For your problem change the line that reads
<%Html.RenderPartial("UserProfile")%>
to
<%Html.RenderPartial("../../Views/Home/UserProfile")%>
or
<%Html.Partial("../../Views/Home/UserProfile.cshtml")%>
Not sure if this is the exact path in your solution but hopefully you understand what I am saying - you cannot use the tilde (~) symbol. You have to use HTML's navigation symbol. Not ideal obviously but I dare say it is better than changing inspection rules.
Also - if you do need to remove an inspection, just comment it out by adding the line
// ReSharper disable once Mvc.PartialViewNotResolved
... // code goes here
or
// ReSharper disable Mvc.PartialViewNotResolved
... // code goes here
// ReSharper restore once Mvc.PartialViewNotResolved
You can use T4 templates POCO string properties to generate the paths. It's a good idea to update these T4 generated classes regularly and use them inside your code.
I was getting this error today from ReSharper 2018.2.3 when did this:
#Html.Partial("_StatusMessage", Model.StatusMessage)
I also noticed a warning from the IHtmlHelper.Partial method itself:
Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync.
So I changed the code to:
<partial name="_StatusMessage" model="Model.StatusMessage" />
That fixed it for me.

How can I use a custom layout and still have the console application work?

I am using a custom layout in Yii. Everything works great in the web part of the app. Then I tried to run the console part of the app to run a job and it says:
exception 'CException' with message 'Property "CConsoleApplication.layout" is not defined.' in /pathToFramework/base/CComponent.php:173
If I revert to the default layout in config/main.php it works again. I can't find any documentation on how to specify the layout only for the console application. I know I can fix it but don't want to get hacky. Does anyone have a clue about the correct wat to go about this? Thanks.
Generally you don't need to specify a layout in your config, but rather do that within your controllers if you're overriding things. That's probably why your CWebApplication can handle things (you're giving it a layout property in your config), but your CConsoleApplication doesn't allow for that property to be set.
Seems like your options are:
Specify your layout property in each controller (any reason you couldn't just use the default views/layouts/main.php?)
Specify your layout property in a config file that is only used for your CWebApplication system instead of your CConsoleApplication
Override your layout property in a config file specific to your CConsoleApplication
Any of the above should work.

NSDocument - how to prevent a document from being marked as updated automatically?

I have a cocoa app that allows the user to enter a query. I'm using an NSWebView with a TextArea HTML object. The problem is, as soon as I type anything into the textarea, my document gets marked as updated. Does anyone know of a way to prevent this?
I've verified that using a NSTextField does not reproduce this behaviour, but I specifically want to go with the HTML/TextArea for styling.
So basically: Can I make it so an NSDocument does not get marked as edited unless I manually call:
[document updateChangeCount: NSChangeDone];
This post on the Apple mailing list seems to match your problem exactly.
The solution suggested is to set a custom undo manager to the webview (sounds like hard work), however a quick-and-dirty hack looks to me like subclassing updateChangeCount and perverting things to your way of thinking.