Front End 2023

Director of User Interface Technology
John Fultz, Wolfram Research, Inc.

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

ABSTRACT

Wherein I discuss Front End things that happened in 2023.

Some things are finished in 13.3 or 14; use it now!

Some things are experimentally exposed in 14; try it out and give us feedback while we polish the design!

Package editor

Reminder, the package editor opens up .wl files as notebooks

Notebook structure, but preserving plain-textness, including line #s

Now with updated toolbar and navigation features

Go to any function or line number

Available in 13.3

Code editing

Fuzzy matching for code completions

By default, case-insensitive

But takes hints from uppercase letters you type

Customizable from Preferences dialog

Available in 13.3

Code editing

Flashing scope of & operator

ColorFunction->RGBColor[#,1-#,0]&

Graphics[{Texture[],TextureMapping->Automatic,Polygon[multiPoints[#]]}]&/@Range[5]

Only flashes if it scopes a Slot-ish thing

Button[tag,CurrentValue[#,CellFrameLabels]={{Inherited,Inherited},{Inherited,If[StringQ[tag],Cell@*BoxData,Identity]@tag}}&/@SelectedCells[]]

Nested ActionMenu

ActionMenu now supports rules that define submenus, arbitrarily deep

ActionMenu["Print",
{"Print factorials"->{
"4!":>Print[4!],
"7!":>Print[7!],
"10!":>Print[10!]
},
"Print double factorials"->{
"4!!":>Print[4!!],
"7!!":>Print[7!!],
"10!!":>Print[10!!]}},BaseStyle->Magnification->2]

“Neat example” that imports the menu system

menus=;
ActionMenu["Main menu",menus,BaseStyle->Magnification->2]

Pixel shader visual effects

Reminder, in earlier versions we had:

DropShadowing

GeoGraphics[{GeoStyling["OutlineMap", 
   DropShadowing[{-3,-3},6],], 
  Polygon[(Entity["Missouri, United States", Entity["AdministrativeDivision",{"Missouri","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Missouri\", \"UnitedStates\"}]", "administrative division"])]}]

Pixel shader visual effects

Reminder, in earlier versions we had:

DropShadowing

Blurring

cloud=WordCloud[EntityValue[CountryData["Europe"],{"Name","LandArea"}]];
cloud/.x:Inset[Style[Except["Sweden"],__],__]:>{Blurring[5],x}

Pixel shader visual effects

In 13.3, we add Haloing

Manipulate[Graphics[{Haloing[{Red,Orange},width,radius],Pink,EdgeForm[Black],Disk[{0,0},1,{Pi/4,3Pi/4}]},PlotRange->{{-1,1},{-.5,1.5}}],{{width,0},-5,5},{radius,0,40}]

Some Haloing applications

Outlining

Graphics[{Haloing[Black],White,Text[Style["Haloing",40]]}]

Some Haloing applications

Outlining

Emphasis

GeoGraphics[{GeoStyling["OutlineMap", 
   Haloing[{,White},1,10],], 
  Polygon[LinguisticAssistant]}]

Some Haloing applications

Outlining

Emphasis

Glowing/neon-style effects

Plot[{Sin[Sqrt[2] x]+Sin[x],Sin[x],Cos[x]},{x,0,10},PlotStyle->Haloing[White,0,4],PlotTheme->"Marketing"]

Graphics[{Haloing[Lighter@Blue,0,8],Text[Style["Haloing",64,FontFamily->"Brush Script MT"]]}]

Wayland support

Wayland is the modern replacement for X11

A significant challenge to traditional GUI development due to  various choices made and defended by the Wayland community

V14 has had a huge focus on resolving Wayland-specific issues

Notebook Assets

With Iconize, we can embed arbitrary expressions in a cell

Iconize[RandomReal[1,{100}]]

[[48;;52]]

Assets allows you to go further, attaching arbitrary expressions to the notebook

Experimental`AssetFind[EvaluationNotebook[],All]

Experimental`AssetAdd["my data",]

Experimental`AssetFind[EvaluationNotebook[],All]

Experimental`AssetValue[Experimental`AssetFind["my data"],"Expression"][[48;;52]]

Notebook Assets

One early experiment is to embed image files directly into notebooks

(* temporary hack for prerelease v14 builds *)
System`AssetAdd=Experimental`AssetAdd;
System`AssetValue=Experimental`AssetValue;
System`AssetRemove=Experimental`AssetRemove;

FileByteCount["C:\\Temp\\xxx.jpg"]

Magnify[Image[Import["C:\\Temp\\xxx.jpg"],"CompressedBoxes"->{True,"AssetObject"}],0.25]

Experimental`AssetFind[EvaluationNotebook[],All]

Experimental`AssetRemove/@%

Notebook Assets — where is all of this going?

Attaching movie and audio files

Embed original data files rather than post-processed data as is more typical usage of Iconize

Creating multi-notebook projects packaged in a single file

Ship code or paclets attached to a notebook

Notebook Diff

The front end team has been uploading more experimental development into the function and paclet repositories

DiffTools is on the paclet repository: https://resources.wolframcloud.com/PacletRepository/resources/Wolfram/DiffTools/

To install just run PacletInstall

PacletInstall["Wolfram/DiffTools"]

Notebook Diff

Use the Compare Cells palette to diff individually selectable cells

Use the Compare Notebooks palette to generate a diff report for entire notebook files

Programmatic options beyond the scope of this talk; attend Lou D’Andria’s talk on Friday

DiffTools moves us very close to generalized expression diffing

Also, it opens a path for enabling better git integration

The future

Assets and DiffTools are shipping experimentally, but still going through the design process

Your feedback is appreciated

Much of the design process is live-streamed

Expect these features and more to evolve and hopefully be production-ready by our spring release

Some other related talks to see

Notebook for this talk:

Upcoming talks (times in CDT)

Right now! — Ian Hojnicki, “Notebook Assets”

Tomorrow

2:30pm — Yuzhu Lu, “Customize Mathematica Graphics Rendering with GLSL”

3pm — James Lane, “Graphics: New Features and Improvements”

Friday

8:30am — Jason Abernathy, “TableView: Recent Developments”

9am — Jason Harris, “BoxIDs, Selections and NotebookProgramming, in the FrontEnd”

10:30am — Lou D’Andria, “Modern Notebook Diffing”

11am — FE team, Office hour

3:30pm — Nick Zitzmann/Rob Raguet-Schofield, “Wolfram Technologies on iOS, iPadOS and visionOS”

3:30pm — Kevin Daily, “3D Game Development in Wolfram Language”