Coder Social home page Coder Social logo

microsoft / workbooks Goto Github PK

View Code? Open in Web Editor NEW
466.0 44.0 78.0 50.4 MB

Workbooks is an interactive programming environment that’s perfect for experimentation, learning, and documentation: an educational tool for learning the myriad of .NET platforms, APIs, and libraries.

License: MIT License

C# 90.15% Makefile 0.01% JavaScript 0.19% C++ 0.26% C 0.01% CSS 1.49% HTML 0.52% TypeScript 7.06% Shell 0.20% PowerShell 0.09%

workbooks's People

Contributors

abock avatar bytesguy avatar lewing avatar mrgeoserge avatar sandyarmstrong avatar yamachu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

workbooks's Issues

Raise SourceTextContainer.TextChanged on the next buffer

Cell 1

var x = 10

Cell 2

Console.WriteLine (x + y)

This results in an editor squiggly in Cell 2 against y. Now go back to Cell 1 and define y. As Cell 1 is being edited and y is defined, Cell 2 should reflect this. We need to chain the SourceTextContainer.TextChanged even to also raise it on the next cell until there are no more cells.

Implicit code-behind `.csx` files per page

Given a .workbook file, implicitly reference a similarly named .csx file if it exists. For example, SomePage.workbook would implicitly #load "SomePage.csx" if it exists.

iOS Coordinate Mapper not working with non-5s devices

Steps to Reproduce

  1. Open a Xamarin.iOS app in VSmac.
  2. Deploy to any non-5s simulator.
  3. Try to use view picker.

Expected Behavior

Views highlight as you hover over them. Clicking a view selects it in the Inspector.

Actual Behavior

Total no-op.


Xcode 9 introduced new simulator chrome as well as the ability to run multiple simulators simultaneously.

We updated iOSSimulatorCoordinateMapper to handle these new options, but made a mistake. Although currently Workbooks always uses the iPhone 5s simulator, the Inspector cannot control the device being used and needs to support all devices.

So, we need to not filter out non-5s devices.

Additionally, we should introduce a way for the IDE (or the agent) to communicate to the Inspector client which simulator is being used so we can pick the right one if multiple devices are running.

iOS: default to iPhone X simulator

We currently default to an iPhone 5S simulator. We should move this forward to iPhone X now that we require Xcode 9.

This is independent of device switching (#21).

Add token/key store API and UI

Add some kind of global API like Keystore ["DocumentDB"] that would allow workbook authors a nice way to indicate to Workbooks that the user needs to provide some kind of auth key/token/whatever for the workbook to be functional.

We could use Roslyn to intercept the call to this API and prompt for/look up an already stored key and return it (e.g. the method/indexer/property call would simply be rewritten in the AST as a const string after the user responds to the UI, etc.)

Add File → Quit or File → Close All

Ideally this would merge all save prompts into one dialog. Closing several unsaved workbooks using the taskbar's "close all windows" is not a fun experience.

Monaco: fix completion case sensitivity issue

Console.be prefers NumberLock over Beep because of the casing. This is a regression in master compared to 1.1, and is presumably due to the Monaco bump.

@sandyarmstrong I wonder if microsoft/vscode@c02a8d0#diff-c736a6665daa725bb10fa992c14c5f81L152 is the culprit.

@sandyarmstrong Might be able to fix just by changing filtertext and/or sorttext for the completion items.

@sandyarmstrong Maybe related, long and haven't read through yet: microsoft/vscode#26096

Audit Xamarin.Mac code for attaching to synthesized events; use full delegate pattern

Upgrading our build to Xcode 9 resulted in a number of surprises - notably every time we save our storyboard, most objects in the storyboard now explicitly instantiate a delegate.

This is problematic in Xamarin.Mac when using synthesized events - subscribing to a synthesized event results in Xamarin.Mac setting a proxy delegate to power the event raising. In the case where Xcode or event Cocoa (targeting the 10.13 SDK) provides a default delegate, Xamarin.Mac will throw an exception on event subscription because it cannot set the backing delegate.

While this seems to be an issue in Xcode/10.13/Xamarin.Mac, we should just avoid using C# events and use our own delegate implementations.

A number of known ones have been fixed, but there may still be more. We should manually audit the Mac code.

#define NETSTANDARD2_0, IOS, ANDROID, etc on CSharpParseOptions

We should automatically define preprocessor symbols on the submissions that map to the workbook's agent type and also standard target framework symbols:

https://docs.microsoft.com/en-us/dotnet/standard/frameworks

Examples

Agent Type Implicit #define
DotNetCore NETCOREAPP2_0, NETSTANDARD2_0
Console NET461 , NETSTANDARD2_0
iOS __IOS__, __MOBILE__, __UNIFIED__, NETSTANDARD2_0
Android __ANDROID__, __MOBILE__, NETSTANDARD2_0
MacMobile __MACOS__, __MOBILE__, NETSTANDARD2_0
MacDesktop __MACOS__, NETSTANDARD2_0
Wpf __WPF__, NET461, NETSTANDARD2_0

#r typing is slow on Mac Console workbooks

This needs to be confirmed. Was reported in Slack by @chkn at the end of June:

@chkn I'm trying to build a quick workbook, but every letter I press takes seconds 😞
@chkn Mac, 1.3 alpha 2, console
@chkn I have what appears to be a consistent repro here

@sandyarmstrong I've never seen laggy input on Mac. Consistent repros are awesome if you can give us the steps

@chkn it's while typing the path in #r .. I'm not sure if it's related to the actual directory it's in or not

@sandyarmstrong thanks. when you are typing in #r, we are doing a fair bit of searching for matching assemblies. It's possible we regressed on some of our optimizations there
@sandyarmstrong do you have time to file a bug?
@sandyarmstrong actually I'll just make a trello card

Meta: NuGet UI Revamp

This is a meta issue that will probably result in several pull requests, and may get split up into additional issues.

It is time to implement a complete NuGet package management experience within Workbooks. We will take our inspiration from Visual Studio, where package management and search all happen from one rich UI.

The idea is to give users more information about the packages they install (before and after installation), to keep their workbooks updated, and to better warn them of package issues that are unique to Workbooks.

Package Manager (to replace current search UI)

Package list

  • Title
  • Author
  • Download stats
  • Installed version
  • Latest available version
  • Description
  • Icon
  • Overlay icon to indicate install/update status

Package details

  • Uninstall button
  • Update/install button
  • Change version dropdown (actionable via Update button)
  • Description
  • Version
  • Authors
  • License
  • Date published
  • Project URL
  • Report Abuse URL
  • Tags
  • Dependency list

Other Changes

Workbooks sidebar changes

  • Show package dependency tree like VS
  • Allow updating packages from sidebar, all or individually (and restart workbook app afterwards)
  • Show package install/load errors in sidebar. Auto-expand nodes when errors occur.

Behavior

  • We allow installing packages that don't bring in any references on this platform, since workbooks can change their target platform at any time. When this happens, warn the user. See https://forums.xamarin.com/discussion/comment/294918/#Comment_294918
    • One suggestion is to add error state to the sidebar tree, and auto-expanding nodes when errors occur.
    • Could also show a warning in the status area
  • Eliminate #r code cells that are currently required to bring in NuGet assembly references.

Under the hood

Allow for not rendering [optional] parameters with default values in `help`

The output of help could use some work when rendering methods with long signatures. Particularly signatures that have parameters with default values. Consider collapsing these. For instance:

public static Task<Image> ImageAsync (Stream stream, CancellationToken cancellationToken = default (CancellationToken))

Might render in help as

Task<Image> ImageAsync (Stream stream,)

IntelliSense will actually show the full member completion.

Inspect view "toolbar" button often missing

@lewing mentions that it might happen if trying to switch from workbook tab to inspect view tab before the visual tree comes in from the agent.

Still happening with master on 6/20/2017. Does not require multiple workbooks. It might be more common if I switch tabs while code is executing but I'm not sure. I usually end up using the view menu to refresh the visual tree @lewing

Handle SubmissionExecutionStatus.Interrupted explicitly

Right now we just show the "agent terminated while evaluating" error message if we abort evaluation. We should instead [again] use/handle SubmissionExecutionStatus.Interrupted and show "evaluation was aborted" or something.

Allow users to pick their preferred iOS/Android device

Users want to be able to pick their preferred device instead of being forced into an iPhone 5s (for example). It should also be possible to change the device for a workbook while it is running.

This work was mostly completed in an old branch, but was put on hold and needs to be rebased and finished.

Need to also make sure that our iOS workbook app works as expected on iPad.

Fix WPF inspection

Inspector needs us to ship Xamarin.Interactive.Wpf.dll in the same folder as the client EXE, even though the client no longer depends on that assembly. That's just where the Inspector extension knows to look for the WPF agent assembly.

Fully split individual workbook app support out of the client

There are a few goals here:

  1. Begin defining the API a third party would use to provide their own workbook apps.
  2. Break up our build so that identical components (such as the Android app and iOS app) do not have to take up build time on both Mac and Windows.
  3. Make it possible to ship a smaller installer, and download large workbooks apps on-demand.
  4. Allow us to ship a larger variety of workbook apps without worrying about bloating the installer.

There is a proof-of-concept branch that needs to be updated and migrated to the new repository. It begins the work of bundling workbook apps with their client support assemblies in NuGet packages, which would allow us to use NuGet as our distribution platform for workbook apps.

The proposed layout for such a NuGet package is:

/
  xamarin.workbooks/
    app/
      net45/ (typically able to share app everywhere)
      mac/ (use these if necessary)
      win64/
    client-support/ (AgentProcess, coord mapper, etc)
      net45/ (more likely to have these split)
      mac/
      win64/

The workbookapp.json file would be in xamarin.workbooks/app/{platform}/, and would make use of the appManagerAssembly property to name the client integration assembly that should be loaded from xamarin.workbooks/client-support/{platform}/.

Ideally we would move public API into Xamarin.Interactive.dll from Xamarin.Interactive.Client.dll, to prevent having multiple assemblies with public API.

Distribute Inspector with IDE extensions instead of in Workbooks installer

Although Workbooks and Inspector clients are based on the same code, distributing them together is no longer helpful. The Inspector client and necessary agent files should be distributed with the the Inspector extension itself (which is already shipped as part of the Visual Studio Enterprise products), not with the Workbooks installers.

The current plan is to still build the Inspector client and the various agents out of the Workbooks git repo, but the build output for them would change into a NuGet package that the IDE extensions could consume.

Since this would add up to 100MB or so to each IDE's on-disk footprint, we need to get approval from IDE leads.

Additionally, we would want to keep shipping Inspector files in our installers until after the bundled Inspector IDE work hit the stable release channel.

3D View: cmd/ctrl + mouse scroll for zoom

Currently, you can zoom the 3D view on Mac with trackpad pinch, and on Windows you can use mouse drag plus some modifiers.

It would be nice if cmd+scrollwheel on Mac and ctrl+scrollwheel on Windows worked, like they do in most web browsers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.