text:
ofxDarknet vs darknet app

My compiled version of the yolo ofxDarknet demo does not behave like the darknet demo application.
At startup, the yolo ofxDarknet demo shows tons of labels, then after a few seconds, no labels at all.
This dysfunctional behavior occurs with all yolo configs. What could be wrong?

the first line in draw is controlling the threshold of what labels to include with the mouse: float thresh = ofMap( ofGetMouseX(), 0, ofGetWidth(), 0, 1 ); maybe you are adjusting it all the way to the right?

You are right; it works as you described.
But it crashes after a few minutes of use, sometimes crashing the computer. I got messages about low memory (my computer have 16G of RAM). How different is this version from the original software?

i haven't had this issue but i haven't used it several minutes at a time. @mrzl mentioned experiencing something like this too, possibly because of a memory leak which we need to investigate.

Indeed, I was experiencing the same. Even after investigating for ages, I couldn't track down the obvious memory leak. I will update here once I found and fixed it..

uhmmm ... not sure if this is the fix but when I was working with training darknet using another application I had to increase my sub-divisions in the cfg file double and then that kind of stopped the memory errors. If you're video ram is leading to the issue that may fix it.

@mrzl Have you resolved this memory leak I haven't been able to find a memory leak or lower its effects either

@gurmeetsidhu you're making reference to a different issue, which is running out of memory on startup. increasing subdivisions as you say fixed that for us (and we updated the cfg files for that). i often have to close a lot of applications as well (especially those which consume vram) to get it to work sometimes.
@marc-antimodular the problem you described in january should also be fixed. it was due to a memory leak which we fixed in https://github.com/mrzl/ofxDarknet/commit/db47306fa7b34d121533afe9c4f13b6bb814f5c4. sorry for the late notice, hope it's useful.

Yep, I think you @genekogan sorted out the memory leak, so we can close this one here, right? Please re-open if there's still an issue!

authors: genekogan gurmeetsidhu marc-antimodular mrzl

repo: mrzl/ofxDarknet


text:
missing libgen.h

when catkin the package, cmd shows that it lacks libgen.h.

@Pyrokine what package are you trying to build?

move_server package in the navigation package

I comment the wrong name. It's map_server

Hi @Pyrokine, can you share more information where you checkout the source code for navigation packages and the steps you took to build?
JFYI, as of today, the Windows build navigation code is in ms-iot fork: https://github.com/ms-iot/navigation/tree/init_windows, and the upstream repository doesn't have the ported changes yet (but the PRs are out, awaiting feedback.)

Thanks a lot. I built the original package from ros-planning/navigation. I found those package you forked from ros and it works.

source: gharchive/issue

authors: Pyrokine seanyen

repo: ms-iot/ROSOnWindows

license: MIT

license_type: permissive

license_source: github-api


text:
rosdep update error

Hi
I am new to ROS, so excuse my lack of knowledge please
I followed the instruction on https://ms-iot.github.io/ROSOnWindows/GettingStarted/SetupRos2.html
and it all ran well and I have foxy now
I then tried to instal cv_bridge
ran the following (using instruction https://ms-iot.github.io/ROSOnWindows/GettingStarted/UsingROSonWindows.html
c:\opt\ros\melodic\x64\setup.bat
mkdir c:\catkin_ws\src
cd c:\catkin_ws
rosinstall_generator cv_bridge --deps --exclude RPP --tar --flat > pkg.rosinstall
vcs import --force src < pkg.rosinstall
rosdep update
got the following error would appreciate your help
reading in sources list data from /etc/ros\rosdep\sources.list.d
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/win-chocolatey.yaml
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/vcpkg.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
ERROR: Rosdep experienced an error: DLL load failed: The specified module could not be found.
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdep
rosdep version: 0.20.0
Traceback (most recent call last):
File "c:\users\cv\appdata\local\programs\python\python37\lib\site-packages\rosdep2\main.py", line 144, in rosdep_main
exit_code = _rosdep_main(args)
File "c:\users\cv\appdata\local\programs\python\python37\lib\site-packages\rosdep2\main.py", line 428, in _rosdep_main
return _no_args_handler(command, parser, options, args)
File "c:\users\cv\appdata\local\programs\python\python37\lib\site-packages\rosdep2\main.py", line 437, in _no_args_handler
return command_handlerscommand
File "c:\users\cv\appdata\local\programs\python\python37\lib\site-packages\rosdep2\main.py", line 649, in command_update
ros_distro=options.ros_distro)
File "c:\users\cv\appdata\local\programs\python\python37\lib\site-packages\rosdep2\sources_list.py", line 498, in update_sources_list
print('Query rosdistro index %s' % get_index_url())
File "c:\users\cv\appdata\local\programs\python\python37\lib\site-packages\rosdep2\rosdistrohelper.py", line 62, in get_index_url
_check_cache()
File "c:\users\cv\appdata\local\programs\python\python37\lib\site-packages\rosdep2\rosdistrohelper.py", line 55, in _check_cache
if RDCache.index_url != rosdistro.get_index_url():
File "c:\opt\ros\foxy\x64\Lib\site-packages\rosdistro_init.py", line 86, in get_index_url
user_cfg_path = os.path.join(user_config_dir('rosdistro'), cfg_file)
File "c:\opt\ros\foxy\x64\Lib\site-packages\rosdistro\external\appdirs.py", line 192, in user_config_dir
path = user_data_dir(appname, appauthor, None, roaming)
File "c:\opt\ros\foxy\x64\Lib\site-packages\rosdistro\external\appdirs.py", line 85, in user_data_dir
path = os.path.normpath(_get_win_folder(const))
File "c:\opt\ros\foxy\x64\Lib\site-packages\rosdistro\external\appdirs.py", line 409, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed: The specified module could not be found.

Hello there,
I'm sorry you are having a problem. the issue is that you have a Python in your path which isn't the one included in the ROS distribution.
Please make sure to remove the python37 out of your system environment and allow the c:\opt\ros\melodic\x64\setup.bat use the one included in the distribution.
Additionally it seems like you are trying to use a ROS1 node in a ROS2 composition; they are treated as separate environments which ultimately communicate with each other over a bridge. I just wanted to make sure you saw that.

Thanks for your quick reply
I removed the python37 from path and was able to progress abot further then failed
This is what I got
c:\catkin_ws>rosdep update
reading in sources list data from /etc/ros\rosdep\sources.list.d
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/win-chocolatey.yaml
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/vcpkg.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Add distro "dashing"
Add distro "eloquent"
Add distro "foxy"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Add distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in C:\Users\cv.ros\rosdep\sources.cache
c:\catkin_ws>rosdep install --from-paths src --ignore-src -r -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
ament_lint_common: No definition of [ament_cmake_export_dependencies] for OS [windows]
uncrustify_vendor: No definition of [uncrustify] for OS [windows]
ament_xmllint: No definition of [libxml2-utils] for OS [windows]
cv_bridge: No definition of [libboost-python-dev] for OS [windows]
ament_cmake: No definition of [ament_cmake_export_include_directories] for OS [windows]
fastrtps: No definition of [asio] for OS [windows]
Continuing to install resolvable dependencies...
executing command [choco upgrade -y cppcheck]
Chocolatey v0.10.15
Upgrading the following packages:
cppcheck
By upgrading you accept licenses for the packages.
cppcheck is not installed. Installing...
cppcheck not installed. The package was not found with the source(s) listed.
Source(s): 'https://aka.ms/ros/public'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify --pre,
the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
assistance.
Chocolatey upgraded 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures

cppcheck - cppcheck not installed. The package was not found with the source(s) listed.
Source(s): 'https://aka.ms/ros/public'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify --pre,
the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
assistance.

Did you know the proceeds of Pro (and some proceeds from other
licensed editions) go into bettering the community infrastructure?
Your support ensures an active community, keeps Chocolatey tip top,
plus it nets you some awesome features!
https://chocolatey.org/compare
ERROR: the following rosdeps failed to install
chocolatey: command [choco upgrade -y cppcheck] failed
chocolatey: Failed to detect successful installation of [cppcheck]

That looks better. The Windows distribution does not have separate metapackages for many things, so rosdep doesn't find them in the distribution. I'd love to fix the distribution so that rosdep can find them, but these are just warnings.
At this time though, it is working as best as expected.
Be Well!


text:
Update the SJF cost model to use the new EC-based cluster aggregator scheme

The SJF cost model now creates its own cluster aggregator node and and connects it appropriately. Also added an illustrative comment to the trivial cost model header.

Code review approved.

source: gharchive/pull-request


text:
🛑 Do53 Roost IPv4 TCP is down

In 53e8a6c, Do53 Roost IPv4 TCP (http://107.189.10.142:9203) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Do53 Roost IPv4 TCP is back up in bc65959 after 52 minutes.

repo: mschirrmeister/upptime-loopx


text:
🛑 Do53 Roost IPv4 UDP is down

In 390b8ef, Do53 Roost IPv4 UDP (http://107.189.10.142:9202) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Do53 Roost IPv4 UDP is back up in eb62a77 after 9 minutes.


text:
🛑 Do53 Roost IPv6 UDP is down

In 6e88250, Do53 Roost IPv6 UDP (http://107.189.10.142:9204) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Do53 Roost IPv6 UDP is back up in e54a915 after 27 minutes.


text:
🛑 Seafile is down

In 734b18d, Seafile (https://seafile.wck.biz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Seafile is back up in c3d40d7 after 6 hours, 31 minutes.


text:
generate_data.py, generate_conformer.py 처리시 "Unkekulized atoms" Error 문의

안녕하세요,
데이터 전처리를 직접 해보고 싶어서 직접 돌려보고 있습니다.
"refined-set"에서 다운받은 데이터중에 690여개 데이터에서 같은 이슈가 발생하는데요.
예를들어 "5u13" 라면 아래와 같이 에러가 발생합니다.
미리 처리하여 올려주신 download.sh로 받은 데이터를 보면 처리 하신후 증강까지 하셨는데..
혹시 어떤 다른 처리를 하셨을까요? 어떤 과정으로 해야할지 조언을 부탁드립니다.
(pignet2) (base) jovyan@ch:~/store1/IRC_workspace$ python /home/jovyan/store1/IRC_workspace/Origin/PIGNet2/dataset/generate_PDA/generate_conformers.py /home/jovyan/store1/jenny_DATA/IRC/refined-set 5u13 --uff --mmff
[09:43:36] Can't kekulize mol.  Unkekulized atoms: 2 9 10 13 15 16
Traceback (most recent call last):
File "/home/jovyan/store1/IRC_workspace/Origin/PIGNet2/dataset/generate_PDA/generate_conformers.py", line 98, in
main()
File "/home/jovyan/store1/IRC_workspace/Origin/PIGNet2/dataset/generate_PDA/generate_conformers.py", line 69, in main
ligand, confids = generate_conformers(ligand, ps)
File "/home/jovyan/store1/IRC_workspace/Origin/PIGNet2/dataset/generate_PDA/generate_conformers.py", line 32, in generate_conformers
confids = AllChem.EmbedMultipleConfs(mol, n_confs, ps)
rdkit.Chem.rdchem.KekulizeException: Can't kekulize mol.  Unkekulized atoms: 2 9 10 13 15 16

안녕하세요,
저희가 Zenodo에 올린 전처리가 된 데이터가 아니라, 원본 PDBbind 데이터 파일로부터 작업을 해보시려는 걸로 이해했습니다.
문제
PDBbind에서 제공하는 리간드 데이터 파일은 화학결합 차수나 원자의 전하 등에 오류가 많이 있습니다.
해당 파일들은 쉽게 표현하자면 RDKit이나 Open Babel 같은 도구로 읽을 때 오류가 납니다.
예를 들어 말씀하신 5U13의 리간드의 경우 올바른 리간드 구조와 PDBbind에 의한 구조들이 아래처럼 다릅니다:

위 예처럼 주로 heteroaromatic ring에서 오류가 많으며, 그런 경우 특히 Kekulize 오류가 나기 쉽습니다.
해결
저희는 직접 다음처럼 리간드 파일들을 수정하여 사용하였습니다.

RCSB 및 해당 PDB를 보고한 논문에서 리간드의 가장 올바른 2D 구조 추출 (즉, 올바른 SMILES 목록 정리).
PDBbind의 .sdf 파일들에 1에서 구한 SMILES를 적용 (RDKit의 AssignBondOrdersFromTemplate 사용).
2에서 실패하는 드문 경우, PyMOL과 같은 분자 구조 편집기를 이용해 직접 결합 차수 수정.

저희가 Zenodo에 공유한 파일들은 위처럼 직접 교정한 후 rdkit.Chem.Mol object로 변환하여 pickling 한 파일들입니다.
위 1-3처럼 직접 작업을 하셔도 되고, 혹은 저희가 공유한 데이터를 이용해 아래처럼 .sdf 파일을 만들어 사용하셔도 됩니다.
import pickle

from rdkit.Chem import AllChem as Chem

with open("5u13", "rb") as f:
    mols: tuple[Chem.Mol, Chem.Mol] = pickle.load(f)
    ligand_mol, pocket_mol = mols

with Chem.SDWriter("5u13_ligand.sdf") as writer:
    # Note that `ligand_mol` had been saved with explicit Hs.
    writer.write(ligand_mol)

authors: sangyeon-hits seohyeonShin


text:
type object 'Dataset' has no attribute 'unify_chunks'

hello, I get a problem when I import msmexplorer as msme:
AttributeError                            Traceback (most recent call last)
 in
----> 1 import msmexplorer as msme
~/anaconda3/envs/tIC/lib/python3.6/site-packages/msmexplorer/init.py in
----> 1 from .plots import *
2
3 from .version import version as _version
4 version = _version
~/anaconda3/envs/tIC/lib/python3.6/site-packages/msmexplorer/plots/init.py in
2 from .msm import *
3 from .tpt import *
----> 4 from .projection import *
5 from .cluster import *
6 from .misc import *
~/anaconda3/envs/tIC/lib/python3.6/site-packages/msmexplorer/plots/projection.py in
3 from matplotlib import pyplot as pp
4
----> 5 from corner import corner
6 from seaborn.distributions import (_scipy_univariate_kde, _scipy_bivariate_kde)
7
...
-> 1397     unify_chunks = _extend_xr_method(xr.Dataset.unify_chunks)
1398     load = _extend_xr_method(xr.Dataset.load)
1399     compute = _extend_xr_method(xr.Dataset.compute)
AttributeError: type object 'Dataset' has no attribute 'unify_chunks'
I don't know how to solve it.

Have u solved this problem? I have the same one.

repo: msmbuilder/msmexplorer


text:
[WIP] Adding support for orientation media queries

I needed support for orientation media queries. In my case it was good enough that orientation media queries always match, but to add it as a feature it might be nice to give the user more control using matching condition options as per e.g. max-width.

Hi Xandor,
First up: thanks for contributing :) I'll look at extending this before release so an option can be passed in to allow certain unmatched queries to always pass. I think it would be best to give the user control over enabling this, in case it causes some unexpected changes for existing users.

authors: mstrutt zeorin

repo: mstrutt/grunt-match-media

license: mit

license_source: bigquery


text:
fix(ClientRequest): respect "options.path" over "url.pathname"

Currently, we ignore the path from the second argument.
@kettanaito
When I do:
url.pathname = "/user?id=123"

It's automatically encodes it. Are we ok with this? see the exepct request.url line

There are more ways to construct http.ClientRequest than there are stars in the sky.

@mikicho, everything looks good from my side. Let me know if we haven't missed anything, and we can merge then. Thanks!

LGTM

Released: v0.25.5 🎉
This has been released in v0.25.5!

📄 Release notes
📦 npm package

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.

Predictable release automation by @ossjs/release.

authors: kettanaito mikicho

repo: mswjs/interceptors


text:
Repository pattern

This is not really an issue, but more an information request. I really like the way repositories are implemented in this project. A problem I usually have with repositories is their size when implementing all the queries needed for the model.
From what I see here I understand that the basic idea is to treat them like immutable collections where methods are basically filters used to reduce the size of the collection.
Can you point me to a book, blog post or another resource that explore the subject in detail?
There's only a little inconsistency though between the doctrine book repository and the in memory one:

in the former if you filter and then you call ofId(), doctrine searches the id in the entire table
in the latter if you do the same you just search in the filtered records set

Except this the idea is excellent.

Hey @vonalbert!
Actually, I followed an excellent blog post by @mnavarrocarter, but it seems like it has been removed (maybe Matias could give us the reason why?).
In the meantime, you can find an archive here.
About the inconsistency, you're totally right, but I think it worth it for the sake of performances.
Many thanks for that review!

Thank you for pointing me to the right direction.
So, when you say "it worth it for the sake of performances" you mean that:

if we use the query builder in DoctrineBookRepository::ofId() in order to adhere to the logic of InMemoryBookRepository, we have a performance penalty because using the query builder is much slower compared to the find method of entity manager
if we keep a copy of the InMemoryBookRepository::$entities array (let's call it InMemoryBookRepository::$unfilteredEntities) that it is not filtered, but only updated via save/remove methods in order to adhere to the EntityManagerInterface logic you have a memory penalty during tests (and a less clean logic in that class)

Is that right?
Given that the InMemory repository is only used for testing purposes (and if I were to choose I'd go for the Doctrine repository way) it's maybe a not-so-big issue leaving the things how are now.
However the thing could change if we're going to migrate data from the database table to a remote service. In that case we could have a SomeCoolLibraryWebserviceBookRepository and I'd really want that the behavior of this one adhere completely to the DoctrineBookRepository.
But I think I'm digressing now :) The issue can be closed since my main question was solved!
Thank you again!

Thank you for pointing me to the right direction.
So, when you say "it worth it for the sake of performances" you mean that:

if we use the query builder in DoctrineBookRepository::ofId() in order to adhere to the logic of InMemoryBookRepository, we'll get a performance penalty because using the query builder is much slower compared to the find method of entity manager
if we keep a copy of the InMemoryBookRepository::$entities array (let's call it InMemoryBookRepository::$unfilteredEntities) that it is not filtered, but only updated via save/remove methods in order to adhere to the EntityManagerInterface logic, you'll get a memory penalty during tests (and a less clean logic in that class)

Is that right?
Given that the InMemory repository is only used for testing purposes (and if I were to choose I'd go for the Doctrine repository way) it's maybe a not-so-big issue leaving the things how are now.
However the thing could change if we're going to migrate data from the database table to a remote service. In that case we could have a SomeCoolLibraryWebserviceBookRepository and I'd really want that the behavior of this one adhere completely to the DoctrineBookRepository.
But I think I'm digressing now :) The issue can be closed since my main question was solved!
Thank you again!

Hey @mtarld I appreciate the credits, and sorry for the article being lost. I'm terrible at keeping my blogs! When I created the new one I didn't migrated all the old entries, and this one got lost in the process.
Thanks to you, however, it has been reposted and polished a bit the one that is my current blog (until I get bored and change it again! 🤣 )
https://blog.mnavarro.dev/the-repository-pattern-done-right
Nice talk at API Platform Conf by the way! 😃
Also @vonalbert if you have any other questions, happy to assist.

@mnavarrocarter first of all, thank you for taking the time to re-post the article.
So if I interpreted correctly your final advice, you're suggesting that the read part of the application is not so important from a domain point of view and as such it could suffice to define a service that simply takes the db record and send to output it as raw data.
To generate this raw data you won't use the repository, since the repository is just a collection of the main aggregate, but you use another service. Does this service belong to the domain layer? If yes I suppose that an interface is required. In this case you define a each read model as a distinct object?
And what about the naming of the service above? Would you call it SomeViewModelProvider? SomeViewModelRepository?

Hi @vonalbert yes. More specifically, if your read operation's purpose is to just expose the data over an API endpoint or any other infrastructure interface, then that read operation its not a domain read operation, and thus can be outside the domain.
Something I've grown fond of doing is that I have a APIResourceFinder interface (the interface belongs, IMO, in the Infrastructure layer, since its HTTP related). It looks something like this:
<?php

interface APIResourceFinder
{
    public function all(string $resource, array $params = []): array;

    public function one(string $resource, string $field, mixed $value): array;
}

This is implemented by something called DoctrineAPIResourceFinder. And there is an implementation that uses the EntityManager. Having the manager there allow us to instrument a few things:

A map of resource names to entity classes
A custom #[API\Unexposed()] attribute in the Entity class to mark which properties should be ignored. You can use class metadata from doctrine to get the entity reflection instance and fetch the properties attributes.
Configure doctrine not to perform any hydration on query.
Build a custom query language on top of the request query parameters to include other resources or specify criteria.
Hypermedia links for related things thanks to Doctrine metadata too.

Is no simple thing to instrument something like this, and it is also highly opinionated to my particular use case, so let me know if you need to look at an existing implementation.
But basically, the principle behind this is that you don't need a repository to provide data to a JSON endpoint. You do need a repository for your command handlers, because they are the heart of your application and logic and you want the persistence layer there completely abstracted away in there.
All this lives in the infra layer. It's your HTTP layer (Infra) making use of your persistence layer (Infra).
Only drawback I see is that when a resource changes implementation, you need to update it's repository implementation and decorate this ApiResourceFinder to handle that resource differently.
Of course, this is one way of doing it. I have other projects where I use the repository in the controller anyway and let a serializer do the heavy lifting. It's completely up to you and what you need for your particular use case.

Thank you for sharing your insight. That was an interesting point of view.

More specifically, if your read operation's purpose is to just expose the data over an API endpoint or any other infrastructure interface, then that read operation its not a domain read operation, and thus can be outside the domain.

Ok, I think I understand. Basically displaying the data over API is a UI concern, so we put that in the infra. But what about those rules that controls which resources I can view? Aren't those related to the domain? For example, take the classic e-commerce application with the classic order aggregate. When a customer request a list of orders should only view a list of its own orders, while the admin can (and should) view all of them. Isn't this rule a domain rule? Or I'm missing something?
On a second thought it's maybe not that important since the rule is enforced in the infrastructure layer anyway (it's the doctrine implementation that performs the query after all).
I think I need to think about it to the implications, but the overall idea makes sense 🙂

let me know if you need to look at an existing implementation.

That would be very appreciated! If you have a public repository I'd love to read the code 🙂

Hi.
I see 3 problems with Repository design here:

Its iterator: https://github.com/mtarld/apip-ddd/blob/main/src/Shared/Domain/Repository/RepositoryInterface.php#L12

because of this it is treated as "collection of objects" in some situations: https://github.com/mtarld/apip-ddd/blob/main/src/BookStore/Infrastructure/ApiPlatform/State/Provider/BookCollectionProvider.php#L42-L46  . This causes some implicit behaviors, and also is hard to track usages of the iterator methods (how to find all "foreaches" that iterate over some Repository ?).

Cloning ( https://github.com/mtarld/apip-ddd/blob/main/src/Shared/Infrastructure/Doctrine/DoctrineRepository.php#L80 etc ) - this causes juggling of instances of Repository. It is not desired behavior of "shared Symfony service" (which resides in container). From such service you expect that you always have one instance of it.
Its hybrid of "repository + query builder + paginator". As described in previous 2 points we can see that this Repository is doing too many things. IMO it should only retrieve, save, update and delete entities. But now it also performs role of query builder (related to cloning and returning instance of self etc) and paginator (has state in form of properties page and itemsPerPage). Those functionalities should be extracted to separate classes.

Hi @domis86 , sorry I have not read your previous comment, but let me respond to your three points. Hopefully I can do it in a clear way, explaining the reasoning behind any decision and providing an alternative if possible.

Regarding the usage of the IteratorAggregate interface, you could not use it. What I've done in some projects is that I've created an interface called Collection that has a collect method, which returns an Iterator of the actual executed query. Implementation is the same as getIterator: it's just a different method. Then, you can do foreach ($users->collect() as $user) and explicitly track the execution of the query. It's not a biggie IMO. Personally, I like the convenience of just Iterate over the collection as I've never felt the need to search for where the iterations happen.

The pattern showcased here doesn't adhere to any particular framework idiosyncrasies, so is not a problem if this doesn't meet the expectations of the Symfony container. But, having said that, I don't think this is true anyway: shared service means that the same reference is shared across get calls, but doesn't necessarily mean that you must have only one, since that would be a singleton and a container cannot enforce such pattern. In other words, the container guarantees to give you the same reference, but it has no business in telling you how many instances you may or may not have of it. You do get the same reference you have in the container every single time in the constructor (so shared service is not violated). What happens after that does not affect the container, nor other services, and cloning is crucial for that, since is a natural API to make this immutable.

SRP is about change, not about roles. The class you mention may seem to have many responsibilities (or seem to do many different things) but it has only one reason to change (which is the main goal of SRP). It might violate other principles like interface segregation, but in software engineering, everything is about tradeoffs. Remember that the purpose of the pattern is to emulate collections. If you have ever used any primary OO language (not PHP, because it didn't start as an OO language) you will see that their collection APIs are full of methods to do a myriad of things. Rust's Vector, for example, has probably close to 100 methods that do many different things. Javascript's Array is about the same. Is that breaking SRP? I don't think so.

authors: domis86 mnavarrocarter mtarld vonalbert

repo: mtarld/apip-ddd


text:
Specify vertex and edge data types with keyword arguments

For example, remove DataGraph(underlying_graph, String, String) in favor of DataGraph(underlying_graph; vertex_data_eltype=String, edge_data_eltype=String), similar to the syntax of MetaGraphsNext.

Closed by #24.


text:
🛑 https://ppsmo.ps is down

In e4fe652, https://ppsmo.ps (https://ppsmo.ps) was down:

HTTP code: 0
Response time: 0 ms

Resolved: https://ppsmo.ps is back up in fbec5e0.

repo: mtitservice/site


text:
🛑 https://ejrs.moj.pna.ps is down

In f1b4e8f, https://ejrs.moj.pna.ps (https://ejrs.moj.pna.ps) was down:

HTTP code: 0
Response time: 0 ms

Resolved: https://ejrs.moj.pna.ps is back up in e3f4b59.


text:
🛑 https://palpro.ps is down

In c429695, https://palpro.ps (https://palpro.ps) was down:

HTTP code: 0
Response time: 0 ms

Resolved: https://palpro.ps is back up in fcd0f8c.


text:
🛑 https://reports.mtit.pna.ps is down

In 4950b6f, https://reports.mtit.pna.ps (https://reports.mtit.pna.ps) was down:

HTTP code: 0
Response time: 0 ms

Resolved: https://reports.mtit.pna.ps is back up in 08870c7.


text:
🛑 https://salfeet.plo.ps is down

In 6839c93, https://salfeet.plo.ps (https://salfeet.plo.ps) was down:

HTTP code: 0
Response time: 0 ms

Resolved: https://salfeet.plo.ps is back up in dda83a4.


text:
🛑 https://reports.mtit.pna.ps is down

In 68414f2, https://reports.mtit.pna.ps (https://reports.mtit.pna.ps) was down:

HTTP code: 0
Response time: 0 ms

Resolved: https://reports.mtit.pna.ps is back up in 4621b89.


text:
Minecraft Bedrock Preview

Hello. I tried to add the save location for Minecraft Bedrock Preview to the PCGW page for use in Ludusavi. I can see it was added to wiki-game-cache.yml in 9a0ad33a25ab4f5d212f57a26bf65bd1efadc201, but not to the manifest. Did I do something wrong? Thanks.

I was actually told by the Discord to do that. There are actually multiple articles that do that, including Cave Story+. Wouldn’t it make more sense for the parser to handle that?

Well, technically I was told to use italics ''(Preview)'' by the Discord, but that Cave Story+ article uses bold '''(Preview)''', so that’s what I did. I’m asking in the Discord now about what is preferred and if it can be added to the editing guide.

Sounds like they have no plans to standardize bold or italic parentheses?

I'd say that a bigger concern in that regard would be pages that use {{notes|}} in their paths, e.g. https://www.pcgamingwiki.com/wiki/Baldur's_Gate:_Dark_Alliance_II; which I presume would take a bit more effort to simply remove in scripts.

Surprisingly, those aren't too bad because I know a {{notes|}} will never be part of the path itself, but bolded text could potentially be part of the path. At least, it could in theory, but if that's not the case in practice, then I can just skip all bold/italic text altogether.
This is the relevant part of how I'm handling paths:
https://github.com/mtkennerly/ludusavi-manifest/blob/15a5a16aed9ffb84d328a8577a3404d919073f7b/src/wiki.ts#L631-L635
For example, node type case "template" followed by template name case "file" means it's handling {{file|...}}. It just skips unhandled templates and uses what's left of the path, but if it encounters an unhandled non-template element, then it discards the whole path.

I just updated it to ignore bold/italic (2b76438e55c4240eabbcd89e386cbf2877318dff), and thanks to some of the recent cleanup by @DandelionSprout on the wiki, it looks like Minecraft: Bedrock Edition is the only game affected by the change 🎉

authors: DandelionSprout RuiNtD mtkennerly

repo: mtkennerly/ludusavi-manifest


text:
ORACLE: ORA-00923: FROM keyword not found where expected. When trying to connect.

Describe the bug
Cant connect.
To Reproduce
Steps to reproduce the behavior:
Try to connect to the DB.
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
Windows10
VSCode 1.38.0
SQLTools 0.20.3

Function "listagg" in file "/packages/core/dialect/oracle/queries.ts".but is only with oracle 11g.
if you  connect 10g (before oracle 10g) then catch the error

Not supported within this repository anymore.

repo: mtxr/vscode-sqltools


text:
Minor improvements

[ ] Contact form has to send email to Titipat
[x] Code highlight in light and dark mode (still dark box in light mode)
[x] Deployment - Github actions and CI for deployment.
[x] Facebook OG image
[x] Logo for the page (Let's separate this to another issue)

@bluenex poke for the left over issue for an emailing button.

Done using EmailJS in #10. Instructions are available on README.md page

repo: mu-badlab/lab


text:
in case when use app.config.from_object ,the key must is always upper

Hi all:
when you use the app.config.from_object(obj)
    def from_object(self, obj):
        """Updates the values from the given object.  An object can be of one
        of the following two types:

        -   a string: in this case the object with that name will be imported
        -   an actual object reference: that object is used directly

        Objects are usually either modules or classes.

        Just the uppercase variables in that object are stored in the config.
        Example usage::

            app.config.from_object('yourapplication.default_config')
            from yourapplication import default_config
            app.config.from_object(default_config)

        You should not use this function to load the actual configuration but
        rather configuration defaults.  The actual config should be loaded
        with :meth:`from_pyfile` and ideally from a location not within the
        package because the package might be installed system wide.

        :param obj: an import name or object
        """
        if isinstance(obj, basestring):
            obj = import_string(obj)
        for key in dir(obj):
            if key.isupper():
                self[key] = getattr(obj, key)

all the key is upper ,so in case when you use method ,we should consider this situation.

thank you for your contribution 👍

authors: BruceDone muatik

repo: muatik/flask-profiler


text:
Recorded audio can't be forwarded/backwarded and can't be played in VLC.

Hi sir Muaz,
I am using RecordRTC API for recording streams audio, the recording generated properly but I can't forward/backward the audio or start from any point for first time. And I can't see also the time length.
I hope you will respond and help me with this.
I am using this code for startRecording:
var el = [];
var mediaRecorder;

$.each($('#remoteVideos video'), function(index, val) {
	 el[index] = val.srcObject;
});
el.push(stream);

mediaRecorder = RecordRTC(el, {
    type: 'audio',
    mimeType: 'audio/webm',
    sampleRate: 96000,
    bufferSize: 4096
});

mediaRecorder.startRecording();`

And this my code for stopRecording:
mediaRecorder.stopRecording(function(blobUrl) {
    var blob = mediaRecorder.getBlob();
    var fileName = getFileName('mp3');

    var fileObject = new File([blob], fileName, {
    	type: blob.type
    });

    var formData = new FormData();
        formData.append('video_blob', blob);
        formData.append('video_filename', fileObject.name);
        formData.append('schedule_id', scheduleId);

    // ajax saved the audio
});

Did I missed something?
Thanks

You can fix it with getSeekableBlob: https://medium.com/@immanubhardwaj/recordrtc-obtaining-seekable-blob-42d26d2a358d

@ianjennings Thanks for your response, but I already fix this issue by adding codecs=pcm
mediaRecorder = RecordRTC(el, {
    type: 'audio',
    mimeType: 'audio/webm;codecs=pcm',
    checkForInactiveTracks: true,
    numberOfAudioChannels: 2,
    bufferSize: 16384
});

But now I got another problem, the recorded audio file has an echo and noise and I don't know where it comes. It might be users headset.
Can you help with this, because I still got a problem of the echo and noise, it might there's a code that can control the audio/noise? Just like https://meet.jit.si/ recording function.
I am new to this environment of recording.
Thanks in advance.

repo: muaz-khan/RecordRTC


text:
06_data.block: create docments

Add docments to 06_data.block.
See the style guide and contribution guide for more details (links will be added when created).
This requires a moderate to advanced familiarity with fastai, specifically Datablocks. This notebook defines the Datablock api.
Docments progress:

[x] TransformBlock
[ ] General API
[ ] Debugging

Hi @warner-benjamin I'll start working on the TransformBlock

@warner-benjamin I can continue working on the general api and debugging sections to finish up the notebook

authors: butchland warner-benjamin

repo: muellerzr/fastai-docment-sprint


text:
 may crash on scaled windows monitors because Chrome renders a scrollbar

I found a bug that may only exist on Windows laptops or Window 4k+ monintors, and it happens when a padding is added to <Input multiline /> and Chrome decides to render a scrollbar.
CodeSandbox demo here

[x] This is not a v0.x issue.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Steps to Reproduce 🕹
If you have a Win10 computer, detailed steps to reproduce are in the CodeSandbox demo
Your Environment 🌎

Tech
Version

Windows!!!!!
10

Material-UI
v4.1.1

React
16.8.6

styled-components
4.3.1

Browser
Chrome 74

@ZYinMD It works on my side. What's the error?

Hi @oliviertassinari , I have identified the real cause of the bug, and have completely re-written my original issue, the issue title, and the CodeSandbox demo. Thanks!!

Hmm, I don't have a 4k monitor, I can't reproduce it on a Windows 10 laptop scaling 125%

Hi @joshwooding , if you change the padding of TeaxArea2 (line 14) to be other numbers, like 2, 3, 4, 5, etc, would a scrollbar appear at all?
Here's what it looks like on my screen (see the scroll bar, maybe you know a better way to make it appear):

And here's the error messages:

@ZYinMD Thank you for taking the time to provide a more detailed reproduction. I can reproduce it now. What do you think of this fix?
diff --git a/packages/material-ui/src/InputBase/Textarea.js b/packages/material-ui/src/InputBase/Textarea.js
index 519648805..daeb8a4bb 100644
--- a/packages/material-ui/src/InputBase/Textarea.js
+++ b/packages/material-ui/src/InputBase/Textarea.js
@@ -121,7 +121,9 @@ const Textarea = React.forwardRef(function Textarea(props, ref) {
         ref={handleRef}
         style={{
           height: state.outerHeight,
-          overflow: state.outerHeight === state.innerHeight ? 'hidden' : null,
+          // Need a large enough different to allow scrolling.
+          // This prevents infinite rendering loop.
+          overflow: Math.abs(state.outerHeight - state.innerHeight) <= 1 ? 'hidden' : null,
           ...style,
         }}
         {...other}

Do you want to submit a pull request? :)

Alternatively, there is this other fix, it's more bundle size efficient:
diff --git a/packages/material-ui/src/InputBase/Textarea.js b/packages/material-ui/src/InputBase/Textarea.js
index 519648805..d018f476b 100644
--- a/packages/material-ui/src/InputBase/Textarea.js
+++ b/packages/material-ui/src/InputBase/Textarea.js
@@ -9,19 +9,6 @@ function getStyleValue(computedStyle, property) {

 const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;

-const styles = {
-  /* Styles applied to the shadow textarea element. */
-  shadow: {
-    // Visibility needed to hide the extra text area on iPads
-    visibility: 'hidden',
-    // Remove from the content flow
-    position: 'absolute',
-    // Ignore the scrollbar width
-    overflow: 'hidden',
-    height: '0',
-  },
-};
-
 /**
  * @ignore - internal component.
  *
@@ -33,24 +20,23 @@ const Textarea = React.forwardRef(function Textarea(props, ref) {
   const { current: isControlled } = React.useRef(value != null);
   const inputRef = React.useRef(null);
   const [state, setState] = React.useState({});
-  const shadowRef = React.useRef(null);
   const handleRef = useForkRef(ref, inputRef);

   const syncHeight = React.useCallback(() => {
     const input = inputRef.current;
-    const inputShallow = shadowRef.current;
+    const savedHeight = input.style.height;
+    const savedOverflow = input.style.overflow;
+    input.style.overflow = 'hidden';
+    input.style.height = '0';

     const computedStyle = window.getComputedStyle(input);
-    inputShallow.style.width = computedStyle.width;
-    inputShallow.value = input.value || props.placeholder || 'x';

     // The height of the inner content
-    const innerHeight = inputShallow.scrollHeight;
+    const innerHeight = input.scrollHeight;
     const boxSizing = computedStyle['box-sizing'];

     // Measure height of a textarea with a single row
-    inputShallow.value = 'x';
-    const singleRowHeight = inputShallow.scrollHeight;
+    const singleRowHeight = getStyleValue(window.getComputedStyle(input), 'line-height');

     // The height of the outer content
     let outerHeight = innerHeight;
@@ -73,6 +59,9 @@ const Textarea = React.forwardRef(function Textarea(props, ref) {
         getStyleValue(computedStyle, 'border-top-width');
     }

+    input.style.overflow = savedOverflow;
+    input.style.height = savedHeight;
+
     setState(prevState => {
       // Need a large enough different to update the height.
       // This prevents infinite rendering loop.
@@ -85,7 +74,7 @@ const Textarea = React.forwardRef(function Textarea(props, ref) {

       return prevState;
     });
-  }, [setState, rows, rowsMax, props.placeholder]);
+  }, [setState, rows, rowsMax]);

   React.useEffect(() => {
     const handleResize = debounce(() => {
@@ -114,27 +103,17 @@ const Textarea = React.forwardRef(function Textarea(props, ref) {
   };

   return (
-    <React.Fragment>
-      <textarea
-        value={value}
-        onChange={handleChange}
-        ref={handleRef}
-        style={{
-          height: state.outerHeight,
-          overflow: state.outerHeight === state.innerHeight ? 'hidden' : null,
-          ...style,
-        }}
-        {...other}
-      />
-      <textarea
-        aria-hidden
-        className={props.className}
-        readOnly
-        ref={shadowRef}
-        tabIndex={-1}
-        style={{ ...styles.shadow, ...style }}
-      />
-    </React.Fragment>
+    <textarea
+      value={value}
+      onChange={handleChange}
+      ref={handleRef}
+      style={{
+        height: state.outerHeight,
+        overflow: state.outerHeight === state.innerHeight ? 'hidden' : null,
+        ...style,
+      }}
+      {...other}
+    />
   );
 });

Hi @oliviertassinari , I'm trying to test your fix, so I went to my local project where the bug exists, and went into project_root/node_modules/@material_ui/core/InputBase/Textarea.js and manually copied in your change. Is it the right way to test it? It didn't seem to make a difference. Not even when I simply set over: 'hidden'. I can prepare a repo if you need.

If you add a console log, can you see it?

Great point! The answer is no. After some experiments, I finally found out that I need to make changes in the esm folder for it to work. PR submited.
Btw I never knew making stupid commits into my own forked repo would show up here. So embarrassed.

@ZYinMD Don’t worry about it, mentioning the issue number in commit messages is a common thing to do. At least it’s the right issue number 😄 The amount of times I have referenced the wrong issue accidentally... 😅

authors: ZYinMD joshwooding oliviertassinari

repo: mui-org/material-ui


text:
[Avatar] Set background colour for AvatarGroup's borders

Summary 💡
Avatar group uses the background colour set for the app for the Avatar borders, but doesn't pick up on the background colour of the div it's within.
.MuiAvatarGroup-avatar {
  border-color: var(--background-color);
}

Examples 🌈
Solution could be to either have a property to set the border colour:
<AvatarGroup backgroundColor={something} />

or to wrap each one in a div that inherits the background colour from a parent. Giving a more hands-off approach.
Motivation 🔦
Used it on a different background and expected it to work without overriding colour.

@WillSquire I have noticed that facebook.com uses a clip logic to solve this problem. However, I'm not sure about the added complexity. I don't see any clear solution out of this. The backgroundColor color sounds like an interesting tradeoff.
I have also noticed that the box model is wrong. We should change it:
diff --git a/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.js b/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.js
index 89ef01ac9..3716f65df 100644
--- a/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.js
+++ b/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.js
@@ -20,6 +20,7 @@ export const styles = (theme) => ({
   /* Styles applied to the avatar elements. */
   avatar: {
     border: `2px solid ${theme.palette.background.default}`,
+    boxSizing: 'content-box',
     marginLeft: -8,
     '&:last-child': {
       marginLeft: 0,

@oliviertassinari Thanks for getting back so fast. I'm racking my brains for a hands-off solution, but I think that could be clean for now. Would you like me to have a try with a pull request?
Also noticed border takes away from the avatar's default size (40px to 36px), but wasn't sure if this was by design? I bumped it to 44px and gave it a negative margin to make it flush with default Avatar when using it.

I don't see any great solution for this:

inline-style: violate strict CSP
style function: too slow
SVG clip: feels over-engineered, hard to customize the shape
a custom class name: current tradeoff
else?

content-box is much cleaner though

Yeah, let's go with this.

Adding the "good first issue" label so we fix the box-sizing: https://github.com/mui-org/material-ui/issues/21700#issuecomment-654935690.
Outside of this, I doubt we can improve the tradeoff, if not by making it easier to style the border color, which we plan in #15561.

Sorry to dig this up, after such a long time, but I noticed that the background/border color mismatch is very noticeable with the new paper colors in dark mode in v5.
Here is an example on an elevation12 paper:

On elevation1, it's still noticeable:


text:
Incorrect behavior of the AppBar component on a custom theme

When trying to create a custom theme using createTheme, and connecting the AppBar component as a nested component below the DOM,
the AppBar component is crushed. A similar problem does not reproduce when using createMuiTheme

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
I am trying to add a new palette using createTheme:
import {createTheme} from '@mui/system';

export const themeOptions = createTheme({
  palette: {
    type: 'light',
    primary: {
      main: '#022B3A',
    },
    secondary: {
      main: '#f50057',
    },
  },
});

export default themeOptions;

and trying to use AppBar passing it in context ThemeProvider
import themeOptions from '../theme';

const App = () => {
  const content = useRoutes(routes);
  return (
    <ThemeProvider theme={themeOptions}>
      <GlobalStyles/>
      {content}
    </ThemeProvider>
  );
};

import {Toolbar, Typography} from '@mui/material';
import AppBar from '@mui/material/AppBar';
import React from 'react';

const TopMenu = () => {
  return (
    <AppBar color="primary">
      <Toolbar>
        <Typography variant="h6" component="div" sx={{flexGrow: 1}}>
            News
        </Typography>
      </Toolbar>
    </AppBar>
  );
};
export default TopMenu;

AppBar component breaks like in the screenshots below:
log error
AppBar log
fullcode on github https://github.com/netaspid/aspid_blog_react
Expected Behavior 🤔
The component must not break. it's ok, if there will be incorrect behavior or display, but the fact that styling breaks the component is wrong
Steps to Reproduce 🕹
Steps:

Install mui, declare a new theme via createTheme
Make a new component inside ThemeProvider with custom theme
Try to add AppBar like on the code examples above

Your Environment 🌎

`npx @mui/envinfo

  System:
    OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
    Memory: 14.76 GB / 18.63 GB
    Container: Yes
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 10.24.1 - ~/.nvm/versions/node/v10.24.1/bin/node
    npm: 6.14.12 - ~/.nvm/versions/node/v10.24.1/bin/npm
  Managers:
    Apt: 2.0.4 - /usr/bin/apt
  Utilities:
    Make: 4.2.1 - /usr/bin/make
    GCC: 9.3.0 - /usr/bin/gcc
    Git: 2.25.1 - /usr/bin/git
  Virtualization:
    Docker: 20.10.8 - /usr/bin/docker
  IDEs:
    Nano: 4.8 - /usr/bin/nano
    VSCode: 1.61.0 - /home/netaspid/.vscode-server/bin/ee8c7def80afc00dd6e593ef12f37756d8f504ea/bin/code
    Vim: 8.1 - /usr/bin/vim
  Languages:
    Bash: 5.0.17 - /usr/bin/bash
    Perl: 5.30.0 - /usr/bin/perl
    Python: 2.7.18 - /usr/bin/python
    Python3: 3.8.5 - /usr/bin/python3`
Browser Google Chrome 94.0.4606.71

@netaspid you should import { createTheme } from '@mui/material/styles';. May I ask how do you end up with @mui/system?

Yes indeed When I try importing from styles, nothing breaks and everything works well. I probably didn't see the correct import line in the documentation. I'm sorry!

Is it because of the auto-import in your IDE?

authors: netaspid siriwatknp


text:
[Menu] Menu containing links

I am trying to use the Menu component to create a dropdown where some of the items are links (e.g. "My profile", "Log out", etc). The documentation (demo and api) does not mention this use case . I have so far found it impossible to achieve the following:

valid html (no  or
 directly in a
)

expected behavior for links when using a mouse (hover to see the link target, right click to open in new tab, etc.)

expected behavior when using the keyboard (moving around the menu and activating links with the keyboard only)

[x] The issue is present in the latest release.

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
The obvious solution (<MenuItem component={Link}>) behaves as expected, but generates invalid html.
Other solutions are broken in different ways.
Expected Behavior 🤔
Have a clear way to include links in a Menu, that behaves as expected with both keyboard and mouse, and generates valid html.
Steps to Reproduce 🕹
Steps:

See code sandbox: https://codesandbox.io/s/basicmenu-material-demo-forked-6w0jp?file=/demo.js

Context 🔦
In the topbar, when the user clicks on their avatar, a menu should pop up containing some links (their profile, settings, logout) as well as buttons. The result should be valid html and behave as expected with both keyboard and mouse.
Your Environment 🌎
See code sandbox.
Tested in Firefox.

The obvious solution () behaves as expected, but generates invalid html.

What is the expected HTML structure that you are looking for? and please you provide the resource for that reference.

Hi,
I would like to be able to achieve what is described here: https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-links.html.

        W3C Home Page

        W3C Web Accessibility Initiative

The last example in the codesandbox shows that this HTML structure can be achieved, however the keyboard behavior is broken:

when navigating the items, the link is not focused (the browser does not show the url)
pressing Enter does not activate the link

Additionally, I would expect to be able to mix links and button in the same menu (for example, some menu items navigate somewhere, others trigger a dialog).

(For Material-UI v4)
To make keyboard focus with the valid HTML structure, I programmed as below:
<Menu
  MenuListProps={{
    // @ts-expect-error https://github.com/mui-org/material-ui/issues/17579
    component: "nav"
  }}
>
  <MenuItem component="div">
    Plain text
  </MenuItem>

  <MenuItem component={Link}>
    Link
  </MenuItem>
</Menu>

This example code is based on https://v4.mui.com/components/lists/#simple-list

authors: gat-cs hata6502 siriwatknp


text:
Failed prop type: Invalid prop children supplied to EnhancedButton, expected a ReactNode.

create new project
npm install

Problem description
not valid
<FlatButton label="add" icon={<SvgIconAddShoppingCart />} />

import React from "react";
import { render } from "react-dom";
import onTouchTapEvent from "react-tap-event-plugin";
import MuiThemeProvider from "material-ui/styles/MuiThemeProvider";

import FlatButton from "material-ui/FlatButton";
import SvgIconAddShoppingCart from "material-ui/svg-icons/action/add-shopping-cart";

onTouchTapEvent();

const Test = () => (
  <div>

    <FlatButton label="add" icon={<SvgIconAddShoppingCart />}/>

    <FlatButton icon={<SvgIconAddShoppingCart/>}/>

    <FlatButton label="add"/>

  </div>
);

render(
  <MuiThemeProvider>
    <Test/>
  </MuiThemeProvider>, document.getElementById('app')
);

Versions

Material-UI: 0.17.1
React: 15.4.*
Browser: Chrome, FireFox, Opera, ....  (ALL Browser)

Unable to reproduce: https://www.webpackbin.com/bins/-Kh7G86UTg0ckGC2hL94

I have this exact same problem, only started today... can not for the life of me figure out why

Worth mentioning that in my case it is with Webpack 2, struggling to find out what version of webpack webpackbin is using...really cool site though

I'm sorry, but, please, start locally, but before that, create a new project and do npm install.
In this case You get to emulate the error that just started today and for previous days.
PS I work with windows 10

@VasilyShelkov No idea in that case...

Pliz fix version on "react-addons-create-fragment": "15.4." to package.json
P.S. new react version 15.5. and react-addons-create-fragment 15.5.* not valid react-addons-create-fragment 15.4.*

I'm getting this as well with React 15.4.2.

It seems to be related to react-addons-create-fragment in React 15.5.

@clayne11 npm update - and get the error

@clayne11 the solution to the problem https://github.com/callemall/material-ui/issues/6552#issuecomment-292740859

react-addons-*@0.15.x should not have breaking changes.
Either something has been fixed in those libs that Material-UI was depending on (so needs to be fixed in MUI), or something has broken on their side.
We could pin MUI at 0.14.2 while we get to the bottom of the issue or move away from these utils. transition-group should be straightforward: https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#discontinuing-support-for-react-addons

Looks like it was fixed 15 hours ago: https://github.com/facebook/react/tree/15.5-dev/addons/react-addons-create-fragment, and released 10 hours ago: https://www.npmjs.com/package/react-addons-create-fragment
You'll need to forcibly upgrade to that version.

@mbrookes Thank you. Indeed, the bug was fixed in the package react-addons-create-fragment: 15.5.3. Topic can be closed, problem solved.

Sorry, we messed up the release and accidentally pushed a wrong version to npm.

@gaearon NP. You guys have had a lot going on. Thanks for stopping by!

what are you thinking about?

Gyes... it very simple, only you have to set condition before the load image, like this...

        {props.item_img?:console.log('loading...')}

          {props.name}

            Price: {props.price}

            MRP: {props.mrp}

OMG! As always! Typos! But thanks to your answer, I find them ☺
Thanks!

authors: Grifano VasilyShelkov clayne11 gaearon kozlikov kumarthapa mbrookes sangzhenlin


text:
[actions] Rename disableActionSpacing to disableSpacing

Uses the same core solution for ExpansionPanelActions, CardActions and DialogActions.
Breaking changes

[CardActions] Rename the disableActionSpacing prop disableSpacing.
[CardActions] Remove the disableActionSpacing CSS class.
[CardActions] Rename the action CSS class spacing.
[DialogActions] Rename the disableActionSpacing prop disableSpacing.
[DialogActions] Rename the action CSS class spacing.
[ExpansionPanelActions] Rename the action CSS class spacing.

This change in the bundle size is interesting:

@material-ui/core/Textarea | -9.19% | -7.30% | 5,866 | 5,327 | 2,465 | 2,285

That "[CardActions] Rename the action CSS class spacing" is a tad underwhelming expression, as the action class was actually removed. The replacing spacing class applies to a completely different element, the root, and not the children.
(I used to override the children of MuiCardActions in the theme overrides, as it was an easy way to override all the buttons inside CardActions, but now it doesn't work any more. *sigh* Well, I'll go now and override them in all the contexts instead or create a themed button for it.)

@synchronos-t Have you tried to do something like this?
.MuiCardActions-root > * {
  background-color: red;
}

@oliviertassinari I was actually gonna use cloneChildrenWithClassName (or copy & paste) in my project, but then saw that it got removed in this PR. Is it because it uses cloneElement and there are issues with it (https://github.com/mui-org/material-ui/issues/12921)?

@NMinhNguyen cloneElement behavior is hidden to the component users. It's unpredictibale. Also, it cas making style overrides more likely not to work.

it makes style overrides more likely not to work

Do you mean because people often forget to forward the props? Or for another reason? Makes sense overall though. Do you think that a context-based class propagation would be better than cloneElement or would you try to use child selectors in the parent instead?

Yes, people have to know they need to forward the props. Using the context has an overhead, it's better to rely on CSS where possible.

Using the context has an overhead

I'm not aware of that. What's the overhead compared to cloneElement?

@eps1lon It has an overhead vs using CSS. The pros of CSS for this case is that it targets any possible DOM node (less room for mistakes), it's fast to run (no JavaScript) and it's fast to write (you don't need to export a module or touch multiple files).

@eps1lon @oliviertassinari I actually remembered a nasty caveat with a context-based solution. At work, we also had a use case where a Parent component wanted to influence how a Child is rendered. Now, since both the Parent and Child were defining a style using a single className, then specificity-wise it came down to source order, i.e. which component in JS is executed first (essentially whose withStyles HOC runs first):
import Parent from './Parent';
import Child from './Child';

// or

import Child from './Child';
import Parent from './Parent';

This was annoying, and the only way to make the order more deterministic was for the Parent to import the child:
// Parent.js
// Side-effecting import - the Parent doesn't render the Child :(
import './Child';

This approach seemed somewhat brittle and kinda relied on the fact that bundlers don't try to tree shake the unused Child import

@NMinhNguyen That's an issue with cloneElement right? (no context)

@oliviertassinari the issue I described above was when we used Context :) We had the Child component render a static class e.g.
function Child() {
  return <span className="static-class" />
}

const parentStyles = {
  child: {
    '&.static-class': {} // higher specificity because child + descendant selector
  }
}

And we wanted to remove this dependency on static classes.. So we introduced context to implicitly pass down childClassName provided by Parent. Because Child wasn't a direct dependency of Parent, then it depended on the order in which our consumers imported them. Does that make sense?

authors: NMinhNguyen eps1lon oliviertassinari synchronos-t


text:
[docs] Reword icons page

[x ] I have followed (at least) the PR section of the contributing guide.

Reword to make more clear the available icons options in MUI.
Partially related to https://github.com/mui-org/material-ui/issues/17444

I resolved all discussions.
What was still partially left out of complete consensus is:

the use of "wrapper" term for Icon around font icons. (line 14, didn't get another suggestion)
the wording of the mention of "Material Icons are based on SVG versions of Material Design icons" (line 18, check the latest version I put on, I like it the best)


text:
[Slider] Add test case for triggering a specific value

[x] I have followed (at least) the PR section of the contributing guide.

Stub getBoundingClientRect in 'should call handlers'.
Fire mouse events down the same node.
Test arguments on handleChange and handleChangeCommitted (aside from call count).

Closes #23398

@Thehambalamba It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!

authors: Thehambalamba oliviertassinari


text:
[icons] Move xlink replace above svgo.optimize calls

[x] I have followed (at least) the PR section of the contributing guide.

While trying to run yarn src:icons I was getting the following error:
TypeError: Cannot read property 'replace' of undefined
    at cleanPaths (/Users/tylergoelz/www/redshelf/material-ui/packages/mui-icons-material/builder.js:198:6)
    at _callee2$ (/Users/tylergoelz/www/redshelf/material-ui/packages/mui-icons-material/builder.js:245:17)
    at tryCatch (/Users/tylergoelz/www/redshelf/material-ui/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/Users/tylergoelz/www/redshelf/material-ui/node_modules/regenerator-runtime/runtime.js:294:22)
    at Generator.next (/Users/tylergoelz/www/redshelf/material-ui/node_modules/regenerator-runtime/runtime.js:119:21)
    at asyncGeneratorStep (/Users/tylergoelz/www/redshelf/material-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/Users/tylergoelz/www/redshelf/material-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)

This is happening because svgo.optimize(input ... is failing due to the following error:
error: 'SvgoParserError: <input>:1:140: Unbound namespace prefix: "xlink"\n' +
    '\n' +
    '> 1 | …".3"/></defs><use xlink:href="#a" overflow="visible"/><clipPath id="b"><us…\n' +
    '    |                                                       ^\n',
  modernError: SvgoParserError: <input>:1:140: Unbound namespace prefix: "xlink"
  ... {
    reason: 'Unbound namespace prefix: "xlink"',
    line: 1,
    column: 140,
    source: '<svg viewBox="0 0 24 24"><g opacity=".3"><defs><path id="a" d="M4 8H14V19H4z" opacity=".3"/></defs><use xlink:href="#a" overflow="visible"/><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M4 19h10V8H4v11zm1-7h2.5V9.5h3V12H13v3h-2.5v2.5h-3V15H5v-3z" clip-path="url(#b)"/></g><path d="M3 3H15V5H3z"/><path d="M14 6H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 13H4V8h10v11z"/><path d="M7.5 17.5 10.5 17.5 10.5 15 13 15 13 12 10.5 12 10.5 9.5 7.5 9.5 7.5 12 5 12 5 15 7.5 15z"/><ellipse cx="20" cy="10" opacity=".3" rx="1" ry="2"/><path d="M20 6c-1.68 0-3 1.76-3 4 0 1.77.83 3.22 2 3.76V20c0 .55.45 1 1 1s1-.45 1-1v-6.24c1.17-.54 2-1.99 2-3.76 0-2.24-1.32-4-3-4zm0 6c-.41 0-1-.78-1-2s.59-2 1-2 1 .78 1 2-.59 2-1 2z"/></svg>'
  }

(the only icon with xlink in it is medication_liquid_two_tone_24px.svg, btw)
I tried adding reusePath as a plugin, as suggested by svgo, but to no avail.
Moving the replacement of xlist to before svgo optimize calls seems to fix the problem.

I believe this was already addressed in another PR #29818.

I believe this was already addressed in another PR #29818.

That's correct. It has been fixed already. If you still experience problems please add a comment and we'll revisit the issue.

authors: chao813 michaldudak yaboi


text:
Chips multiple accessibility issues

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Steps to reproduce 🕹
Can reproduce in a StackBlitz code snippet provided in the component docs.
Steps:

Open https://stackblitz.com/run?file=src%2Fapp%2Fchips-overview-example.html
Add multiple attribute to mat-chip-listbox to allow multiselect.
Turn on a screen reader and navigate between chip options.

Current behavior 😯
When multiselect enabled, when clicking/tabing on a chip, screen reader announces:
On MacOS + VoiceOver:
(when option selected) "{label} selected, selected"
(when option not selected) "{label} not selected, selected"
On Linux + Orca:
(when option selected) "{label}"
(when option not selected) "{label} not selected"

Expected behavior 🤔
When multiselect enabled, when clicking/tabing on a chip, screen reader announces:
(when option selected) "{label} selected"
(when option not selected) "{label} not selected"
Context 🔦
The described behavior is confusing to customers who use screen readers.
Your environment 🌎
No local env, was able to repro in example code snippet in Chrome.
https://stackblitz.com/run?file=src%2Fapp%2Fchips-overview-example.ts

@striped-s0cks
I think you posted this at wrong place.
The library you are using is Angular material and this is react material ui repository where you reported this issue,

Oh god I am so so sorry, it's been a very long week....
Thank you!

repo: mui/material-ui


text:
No colorPrimary or success properties on OutlinedInputClasses

If I want to get the MUI class of a success input element I have to code it via props in the logic, but I'd like to know if there is a similar way when, for example, we get the error class, or the colorSecondary.
https://github.com/mui/material-ui/blob/a33eb7cba66a5c5631ba77c96d2fafaa12ed9f32/packages/mui-material/src/OutlinedInput/outlinedInputClasses.ts#L5-L9
We have colorSecondary or even error here
https://github.com/mui/material-ui/blob/0d3aba1c9433dc5dd79dd9af6821c25b48d6f4f7/packages/mui-material-next/src/Input/inputClasses.ts#L14
I wonder why we don't have a colorPrimary or success
Example of use
For example, in a theme, we can custom set a color if the input has error state as follow:
[`&.${outlinedInputClasses.error}`]: {
  color: "red"
 }

But we can't set it if the input has success state because there is no outlinedInputClasses.success or outlinedInputClasses.colorPrimary

success state mainly depends on the context of the app. It could mean that if there is no error either when all the validation has passed. You could still use the color prop directly to style you success state when there is no error in your input.

success state mainly depends on the context of the app. It could mean that if there is no error either when all the validation has passed. You could still use the color prop directly to style you success state when there is no error in your input.

It's true, but if inputs would allow to receive a prop like success, we would still be able to manage it while MUI applies the proper palette. I understand the paradigm of having two boolean could lead to a wrong use, but again that would rely on the developer.
No sucess and no error  => Stand by (as it is now when boolean error is false).
--
Another approach if success is too opinionated, would be colorPrimary as a property of OutlinedInputClasses so we could do :
[`&.${outlinedInputClasses.colorPrimary}`]: {
  border: "1px solid blue"
 }

Anyway, this is more a suggestion than an issue, so take it like that. Thanks!


text:
[joy-ui][docs] Theme viewer throwing a client-side exception error

Steps to reproduce
Link to live example: (required)
https://mui.com/joy-ui/customization/theme-builder/
Steps:

Navigate to the MUI Theme Builder
Double-click on the Dark theme button
See client Exception

https://github.com/mui/material-ui/assets/23152623/0aa8580d-a118-4cc4-92a1-2c80b61addf3
Current behavior
Client-Side Exception Error.
Console Error:
main-d9c74b1af963c3f2.js:1 TypeError: Cannot read properties of undefined (reading 'palette')
    at theme-builder-b2a624…7b468449.js:1:90006
    at Object.l5 [as useMemo] (framework-b6917e2005159cfe.js:17:101962)
    at t.useMemo (framework-b6917e2005159cfe.js:33:5984)
    at modules/components/JoyThemeBuilder.tsx (theme-builder-b2a624…7b468449.js:1:89942)
    at lD (framework-b6917e2005159cfe.js:17:97589)
    at oU (framework-b6917e2005159cfe.js:17:110090)
    at i (framework-b6917e2005159cfe.js:17:163565)
    at ia (framework-b6917e2005159cfe.js:17:147020)
    at framework-b6917e2005159cfe.js:17:146799
    at ir (framework-b6917e2005159cfe.js:17:146806)

Expected behavior
I'd expect the button to accept a double click without throwing the exception.
Context
I was experimenting with the Theme Builder when I came across this issue.
Your environment

Sidekick Browser Version 122.5
Google Chrome Version 124.0

Search keywords: Theme Viewer Client-Side Exception Error

It works on my end. I believe that there might be a caching issue. Please try again.

authors: sambowenhughes siriwatknp


text:
[code-infra] Fix release:publish:dry-run script

The --registry argument was available when lerna was used. pnpm does not support it, but it does have the same --[dry-run attribute](https://pnpm.io/cli/publish#--dry-run) as npm.
I noticed this when working on https://github.com/mui/mui-x/pull/11875.

I used it without issues. But it's fair to say that it wasn't really a dry run but publishing to a local registry. The pnpm's dry-run works differently - it just doesn't publish.

@michaldudak Thank you for confirming it. 👍
Double-checked that it works.
The suggested port is used by default by verdaccio.

authors: LukasTy michaldudak


text:
[material-ui][Modal] Remove focus before set aria-hidden

Resolves: #43106
See https://github.com/mui/material-ui/issues/43106#issuecomment-2271044525 for details

[x] I have followed (at least) the PR section of the contributing guide.

I don't think the current implementation is a good idea, but I haven't found an elegant way to solve this problem.

Closing this PR. See https://github.com/mui/material-ui/issues/43106#issuecomment-2314809028

authors: ZeeshanTamboli Zxilly


text:
Support layout template

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Summary 💡
Layout template means some common layout of page, login page, home page, about page, dashboard page....
Layout template contain slots or  placeholder which users can drag components to it.
And user can build own layout template.
Examples 🌈
No response
Motivation 🔦
No response

Seems like this and https://github.com/mui/mui-toolpad/issues/1063 could be the same issue as they could be solved by the same feature.

Layout template have just layout and placeholder. Page template is a finished page, which you can replace component of it.
Feel they are little different.

@apedroferreira @prakhargupta1
Follow these steps, can generate a layout template:

build normal page

copy dom, and use editor to modify content of it:
**replace all none-layout-element (Button,Image,TextField...) component's "attributes.component.value" to 'PageRow'. **

{
  "root": "cl27ajqk00000a0oz4xlqcy7n",
  "nodes": {
    "bx13gj8": {
      "id": "bx13gj8",
      "name": "pageRow",
      "type": "element",
      "props": {},
      "layout": {},
      "parentId": "cl27arb1i00043g693pzhex2r",
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "parentProp": "children",
      "parentIndex": "a0"
    },
    "cl27ajqk00000a0oz4xlqcy7n": {
      "id": "cl27ajqk00000a0oz4xlqcy7n",
      "name": "Application",
      "type": "app",
      "parentId": null,
      "attributes": {},
      "parentProp": null,
      "parentIndex": null
    },
    "cl27arb1i00043g693pzhex2r": {
      "id": "cl27arb1i00043g693pzhex2r",
      "name": "dogBreedsPage",
      "type": "page",
      "parentId": "cl27ajqk00000a0oz4xlqcy7n",
      "attributes": {
        "title": {
          "type": "const",
          "value": "breeds"
        },
        "urlQuery": {
          "type": "const",
          "value": {}
        }
      },
      "parentProp": "pages",
      "parentIndex": "a0"
    },
    "cl3x8003500003f6ej4x3sx3q": {
      "id": "cl3x8003500003f6ej4x3sx3q",
      "name": "theme",
      "type": "theme",
      "parentId": "cl27ajqk00000a0oz4xlqcy7n",
      "attributes": {},
      "parentProp": "themes",
      "parentIndex": "a0"
    },
    "0b23glf": {
      "name": "button",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "0b23glf",
      "type": "element",
      "parentId": "1853ggm",
      "parentProp": "children",
      "parentIndex": "a0"
    },
    "pt33g3c": {
      "name": "button1",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "pt33g3c",
      "type": "element",
      "parentId": "bx13gj8",
      "parentProp": "children",
      "parentIndex": "a1"
    },
    "1853ggm": {
      "name": "pageColumn",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageColumn"
        }
      },
      "layout": {
        "columnSize": {
          "type": "const",
          "value": 1
        }
      },
      "id": "1853ggm",
      "type": "element",
      "parentId": "bx13gj8",
      "parentProp": "children",
      "parentIndex": "a0V"
    },
    "x143gle": {
      "name": "button2",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "x143gle",
      "type": "element",
      "parentId": "1853ggm",
      "parentProp": "children",
      "parentIndex": "a0V"
    },
    "sr73gsz": {
      "name": "pageRow1",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "sr73gsz",
      "type": "element",
      "parentId": "cl27arb1i00043g693pzhex2r",
      "parentProp": "children",
      "parentIndex": "Zz"
    },
    "tr63g06": {
      "name": "typography",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "tr63g06",
      "type": "element",
      "parentId": "sr73gsz",
      "parentProp": "children",
      "parentIndex": "a0"
    },
    "1r93g10": {
      "name": "pageRow2",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "1r93g10",
      "type": "element",
      "parentId": "cl27arb1i00043g693pzhex2r",
      "parentProp": "children",
      "parentIndex": "a1"
    },
    "6y83ggv": {
      "name": "image",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {
        "columnSize": {
          "type": "const",
          "value": 0.6381118881118881
        }
      },
      "id": "6y83ggv",
      "type": "element",
      "parentId": "1r93g10",
      "parentProp": "children",
      "parentIndex": "a0"
    },
    "81c3gj9": {
      "name": "pageRow3",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "81c3gj9",
      "type": "element",
      "parentId": "cl27arb1i00043g693pzhex2r",
      "parentProp": "children",
      "parentIndex": "a0V"
    },
    "9rb3g2b": {
      "name": "typography1",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {},
      "id": "9rb3g2b",
      "type": "element",
      "parentId": "81c3gj9",
      "parentProp": "children",
      "parentIndex": "a0"
    },
    "8ud3gbl": {
      "name": "dataGrid",
      "props": {},
      "attributes": {
        "component": {
          "type": "const",
          "value": "PageRow"
        }
      },
      "layout": {
        "columnSize": {
          "type": "const",
          "value": 1.3618881118881119
        }
      },
      "id": "8ud3gbl",
      "type": "element",
      "parentId": "1r93g10",
      "parentProp": "children",
      "parentIndex": "a1"
    }
  }
}

update database using this modified value (I use TablePlus app)

reload page editor, layout template picture:

Thanks! We'll keep this in mind if we implement this feature.

authors: WangLarry apedroferreira

repo: mui/mui-toolpad


text:
Provide types for the function runtime

Steps to reproduce 🕹

Create a function query

observe the type errors:

Introduced in https://github.com/mui/mui-toolpad/pull/1180 where we removed the DOM lib by default from the TypeScript editor.
This is a good thing, because  the DOM lib included way more types than the function runtime supports. We'll just have to build a custom .d.ts file for the function runtime that only includes what it supports. for now:

fetch, (Headers, Response, FormData,...)
URL
console
setTimeout, clearTimeout
AbortController
TextEncoder
streams
...?

Any way we can automate this? Can we do something with https://github.com/microsoft/TypeScript-DOM-lib-generator to generate a subset?

Closing as discussed with Jan