SPFx solution with 2 pages and web parts communicating

%3CLINGO-SUB%20id%3D%22lingo-sub-2190116%22%20slang%3D%22en-US%22%3ESPFx%20solution%20with%202%20pages%20and%20web%20parts%20communicating%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2190116%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20replacing%20a%20server%20side%20solution%20that%20allowed%20a%20master%20application%20page%20to%20fire%20headless%20window%20that%20talk%20to%20the%20originating%20page.%3C%2FP%3E%3CP%3ENow%20I%20am%20doing%20it%20in%20SPO%20with%20SPFx%20and%20so%20far%20I%20just%20used%20one%20page%20and%20web%20part%20with%20a%20big%20dialog%20that%20can't%20get%20out%20of%20the%20sending%20page.%3C%2FP%3E%3CP%3EMy%20users%20want%20to%20be%20able%20to%20put%20the%20dialog%20on%20the%20second%20monitor%20so%20I%20think%20I%20have%20to%20do%20it%20in%20a%20different%20window%20%2F%20web%20part.%20I%20am%20planning%20a%20version%202.0%20and%20collection%20ideas%20how%20to%20do%20it.%3C%2FP%3E%3CP%3ESo%20far%20I%20think%20I%20will%20use%20%22%3CA%20title%3D%22npm%20broadcast-channel%22%20href%3D%22https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fbroadcast-channel%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Ebroadcast-channel%3C%2FSPAN%3E%3C%2FA%3E%22%20for%20communicating%20between%20the%20parent%20page%2Fweb%20part%20and%20the%20child%26nbsp%3Bpage%2Fweb%20part.%3C%2FP%3E%3CP%3EI%20still%20need%20to%20figure%20out%20the%20following%3A%3C%2FP%3E%3COL%3E%3CLI%3EHow%20to%20create%20a%20sharepoint%20page%20containing%20just%20a%20SPFx%20web%20part%20without%20all%20the%20side%20and%20top%20bla%20bla.%20(safe%20to%20hide%20by%20CSS%3F)%3C%2FLI%3E%3CLI%3EHow%20to%20pass%20the%20spfxContext%20from%20parent%20to%20child%26nbsp%3B%3C%2FLI%3E%3CLI%3Ehow%20to%20debug%202%20separate%20SPFx%20projects%20at%20the%20same%20time%20while%20building%20the%20solution.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EAny%20suggestion%20is%20welcomed.%20Samples%20even%20more%20%3A*%3C%2Fimg%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2190116%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESPFx%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

I am replacing a server side solution that allowed a master application page to fire headless window that talk to the originating page.

Now I am doing it in SPO with SPFx and so far I just used one page and web part with a big dialog that can't get out of the sending page.

My users want to be able to put the dialog on the second monitor so I think I have to do it in a different window / web part. I am planning a version 2.0 and collection ideas how to do it.

So far I think I will use "broadcast-channel" for communicating between the parent page/web part and the child page/web part.

I still need to figure out the following:

  1. How to create a sharepoint page containing just a SPFx web part without all the side and top bla bla. (safe to hide by CSS?)
  2. How to pass the spfxContext from parent to child 
  3. how to debug 2 separate SPFx projects at the same time while building the solution.

Any suggestion is welcomed. Samples even more :* 

Thank you in advance.

0 Replies