TextLayer

A proposal — for review to add a TextLayer and an InputLayer to the Framer Library.
TextLayers
Why?
Working with text is not easy as of now. It’s possible, using HTML and setting the CSS styles, but not ideal. Plus, there are a few things designers are used to when working with text in visual design tools, like the width and height being dynamically calculated. Inputs are trickier, and could be made a lot easier with ready-made events, character filtering, easy styling abilities and more.
API & Feature Overview
Let’s start with TextLayers.
title = new TextLayer
    text: "Hey there!"

Properties:

text — define text as a string.
fontSize — like CSS, number (or string)
fontFamily — like CSS, string
fontWeight — like CSS, number (or string)
lineHeight — like CSS, number (or string)
letterSpacing — like CSS, number (or string)
textAlign — like CSS, string
textTransform — like CSS, string
autoWidth — automatically calculate and set width (boolean)
autoHeight — automatically calculate and set height (boolean)

This is where the fun starts: Should  this be considered a Component rather than a layer? BackgroundLayers are slowly becoming obsolete with the simplified Screen.backgroundLayer approach. VideoLayers and ImageLayers are gone too. TextLayers have unique properties and events, so it would make sense to consider it a Component. My only concern is that I assume most people would think of it as a type of layer.

Styling Text
Text styling properties match with the ones seen in CSS. The class extends Layer, so all default layer properties are available as well.
title = new TextLayer
    width: Screen.width
    color: "#000"
    fontSize: 80
    fontWeight: 600
    lineHeight: 1.5
    text: "Design everything"

Automatic Width & Height
Layers inherit default width and height properties. This is not always ideal when working with text. Often, you’ll want to define a constraint (width, or height) and have the rest flow automatically. Much like text boxes behave in visual design tools.
This is where autoWidth and autoHeight come in.
title = new TextLayer
    width: Screen.width
    autoHeight: true
    fontSize: 80
    fontWeight: 600
    lineHeight: 1.5
    text: "In a world with no boundaries, what will you design?"

The title above has one constraint, the width. The height (or width) of the  layer is automatically calculated and set for you. All stylistic properties have effect on the outcome, like fontSize and lineHeight etc.
Demo videos

Of autoHeight: https://cl.ly/hJEX
Of both autoWidth and autoHeight: https://cl.ly/hIvr

Context-Aware System Defaults
If you haven’t specified a fontFamily, I check the platform of the device you’re designing for in Framer. The font family will then match the native system font, if available. This hopefully makes it easier to get started, and prevents people from having to continiously having to define a font when working with text.

When viewing on an Apple device: San Fransisco.
When viewing on a Google device: Roboto.
When viewing on a Microsoft device: Segoe UI.

If one of the default typefaces isn’t available (installed), it defaults back to Helvetica Neue.
*Note: Currently not using the recently added Utils.deviceFont utility, because I’d like it to work on a device-level, rather than an OS-level. (So, when working on a Mac, but previewing on a Microsoft device → Segoe UI.)

Working with WebFonts
As an extra, I’ve added a utility to work with Google Web Fonts, named Utils.webFont(). It takes a string, the name of the font. It includes the font within your project, but returns the title of the typeface, so you can use it in two ways.
Set it directly:
title = new TextLayer
    fontFamily: Utils.webFont("Montserrat")

Include & use name:
Utils.webFont("Montserrat")

title = new TextLayer
    fontFamily: "Montserrat"

My only worry is that if someone includes 5+ typefaces, the loading time of his/her prototype gets significantly slower. But perhaps this can be considered an edge-case.

Example project
Play around with TextLayers in this sample project.

InputLayers
API & Feature Overview
InputLayers extend the TextLayer class, so all text styling properties are inherited, and you can easily switch between the two.
field = new InputLayer

By default, it has placeholder text (“Placeholder”).
This text is placed within a Framer layer, called input. This positions the layer (a little spacing on the left, using the x property) and allows it to be referenced.
field = new InputLayer

# Extra padding
field.input.x = 30

Properties:

focusColor — set text color when focused (color)
multiLine — allow multi-line input (boolean)

Events:

onEnterKey — on enter keypress
onBackSpaceKey — on backspace keypress
onInputChange — when input changes
onInputFocus — when input is in focus
onInputBlur — when input is blurred (unfocussed)

Styling Inputs
By defaults, InputLayers inherit a white background, with grey placeholder text. The color property can be used to style the placeholder text, while focusColor can be used to style the text when the input field is in focus.
field = new InputLayer
    color: "grey"
    focusColor: "black"

To change the default placeholder text, you use the text property, as seen in TextLayers.
field = new InputLayer
    text: "Type here"

Character Filtering
When listening to input value changes, every key you press is considered a value. This means that if you want to trigger an interaction or animation on the first character press, this also happens when someone presses caps lock or shift.
I’m assuming that for prototyping and design purposes, this is most-often undesirable behaviour, so I’ve attempted to “filter” all of these values that don’t actually produce a character.
This means that the InputValueChange won’t fire when pressing the following characters. So only on “true” value changes.

Enter key
Shift key
Capslock key
Control key
Alt key
Command key
Select key

UPDATE: New way of filtering works by actually checking if the value has changed, and only emits change events if it has. Safer and more scalable than specific filtering. See https://github.com/koenbok/Framer/commit/c7397348e92b2cacc15e2e1ab179f69adb481b0f.
Demo video

Input Events: https://cl.ly/hJn6

Multi-line Input Fields
InputLayers can also be multiLine input fields. This allows you to press enter, and then to continue typing on a new line. Especially useful when designing something like a notes or journaling app.
area = new InputLayer
    multiLine: true
    height: 500

Because the text within the InputLayer is rendered with a Framer layer, the vertical spacing can easily be adjusted for multi-line text areas by simply setting the y property.
area = new InputLayer
    multiLine: true
    height: 500

area.input.y = 30

Demo video

From single to multi-line: https://cl.ly/hJFN

Thanks for reading! Will continue updating this overview and pull request.

Yes!!! 🚀
On Tue, Oct 18, 2016 at 2:59 AM Benjamin den Boer<EMAIL_ADDRESS>wrote:

You can view, comment on, or merge this pull request online at:
https://github.com/koenbok/Framer/pull/434
Commit Summary

Setup TextLayer and InputLayer
Fix Framer include, require, events
Platform aware defaults, add autoWidth and autoHeight, letterSpacing
Extend input event emit with numbers and special characters
Fix key event names and add shortcuts
Change character detection by excluding instead of checking to
better translate between languages
Include backspace but stop firing event when values are empty
Clean previous character support array
InputLayer Events
Make the InputLayer an extension of the TextLayer so it inherits all
of its properties
Match property defaults and test padding
Clean up old methods, add focus event
Improve text defaults detection, Clean defaults, Implement multiline
textArea support
Add shortcut property for designing focus states
Add textAlign property
Make placeholder method and hookup to onBlur event
Minify exclusion
Clean empty value detection
Add check for focus, improve placeholder behaviour to check if value
is empty when in focus too for @jonastreub
Redo borderRadius with support for individual corners, throw warning
when setting with string, also support single number
Clean old
Prep for diff branch
macOS defaults
Clean up and update repo
Match and inherit text color to placeholder
Input placeholder behaviour, wrap element in layer to allow
positioning properties to be used instead of CSS margins
Add platform aware defaults for microsoft devices
Add input blur events
Add webFont utility for Google Web Fonts
Add text transform property
Remove old DevServer.framer
Fix resize caret, placeholder replacements
Add method to match text defaults, allow input properties to be set
outside of constructor
Clear word breaks
Merge branch 'master' into feature/text-layers

File Changes

A extras/Studio.framer/.viewer.html
https://github.com/koenbok/Framer/pull/434/files#diff-0 (39)
M extras/Studio.framer/app.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-1 (14)
D extras/Studio.framer/framer/.bowerrc
https://github.com/koenbok/Framer/pull/434/files#diff-2 (3)
M extras/Studio.framer/framer/coffee-script.js
https://github.com/koenbok/Framer/pull/434/files#diff-3 (12)
M extras/Studio.framer/framer/config.json
https://github.com/koenbok/Framer/pull/434/files#diff-4 (7)
M extras/Studio.framer/framer/framer.init.js
https://github.com/koenbok/Framer/pull/434/files#diff-5 (27)
M extras/Studio.framer/framer/framer.js
https://github.com/koenbok/Framer/pull/434/files#diff-6 (22234)
M extras/Studio.framer/framer/framer.js.map
https://github.com/koenbok/Framer/pull/434/files#diff-7 (2)
A extras/Studio.framer/framer/manifest.txt
https://github.com/koenbok/Framer/pull/434/files#diff-8 (84)
D extras/Studio.framer/framer/mirror.css
https://github.com/koenbok/Framer/pull/434/files#diff-9 (196)
A extras/Studio.framer/framer/preview.png
https://github.com/koenbok/Framer/pull/434/files#diff-10 (0)
A extras/Studio.framer/images/banner.png
https://github.com/koenbok/Framer/pull/434/files#diff-11 (0)
A extras/Studio.framer/images/bg.jpg
https://github.com/koenbok/Framer/pull/434/files#diff-12 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-13 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-14 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-15 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-16 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-17 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-18 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-19 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-20 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-21 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-22 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-23 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-24 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-25 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-26 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-27 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-28 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-29 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-30 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-31 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-32 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-33 (0)
A<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-34 (613)
A<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-35 (614)
A extras/Studio.framer/modules/WindowComponent.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-36 (219)
M framer/Framer.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-37 (4)
A framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-38 (151)
A framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-39 (123)
M framer/Utils.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-40 (8)

Patch Links:

https://github.com/koenbok/Framer/pull/434.patch
https://github.com/koenbok/Framer/pull/434.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/koenbok/Framer/pull/434, or mute the thread
https://github.com/notifications/unsubscribe-auth/AACbYjeOZSWmb_gMdLidO3lWBipbIMDSks5q1JhtgaJpZM4KZmKq
.

There are two things I could recommend adding... line-clamp and ellipsis.
On Tue, Oct 18, 2016 at 1:10 PM Jordan Dobson<EMAIL_ADDRESS>wrote:

Yes!!! 🚀
On Tue, Oct 18, 2016 at 2:59 AM Benjamin den Boer <
<EMAIL_ADDRESS>wrote:

You can view, comment on, or merge this pull request online at:
https://github.com/koenbok/Framer/pull/434
Commit Summary

Setup TextLayer and InputLayer
Fix Framer include, require, events
Platform aware defaults, add autoWidth and autoHeight, letterSpacing
Extend input event emit with numbers and special characters
Fix key event names and add shortcuts
Change character detection by excluding instead of checking to
better translate between languages
Include backspace but stop firing event when values are empty
Clean previous character support array
InputLayer Events
Make the InputLayer an extension of the TextLayer so it inherits all
of its properties
Match property defaults and test padding
Clean up old methods, add focus event
Improve text defaults detection, Clean defaults, Implement multiline
textArea support
Add shortcut property for designing focus states
Add textAlign property
Make placeholder method and hookup to onBlur event
Minify exclusion
Clean empty value detection
Add check for focus, improve placeholder behaviour to check if value
is empty when in focus too for @jonastreub
Redo borderRadius with support for individual corners, throw warning
when setting with string, also support single number
Clean old
Prep for diff branch
macOS defaults
Clean up and update repo
Match and inherit text color to placeholder
Input placeholder behaviour, wrap element in layer to allow
positioning properties to be used instead of CSS margins
Add platform aware defaults for microsoft devices
Add input blur events
Add webFont utility for Google Web Fonts
Add text transform property
Remove old DevServer.framer
Fix resize caret, placeholder replacements
Add method to match text defaults, allow input properties to be set
outside of constructor
Clear word breaks
Merge branch 'master' into feature/text-layers

File Changes

A extras/Studio.framer/.viewer.html
https://github.com/koenbok/Framer/pull/434/files#diff-0 (39)
M extras/Studio.framer/app.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-1 (14)
D extras/Studio.framer/framer/.bowerrc
https://github.com/koenbok/Framer/pull/434/files#diff-2 (3)
M extras/Studio.framer/framer/coffee-script.js
https://github.com/koenbok/Framer/pull/434/files#diff-3 (12)
M extras/Studio.framer/framer/config.json
https://github.com/koenbok/Framer/pull/434/files#diff-4 (7)
M extras/Studio.framer/framer/framer.init.js
https://github.com/koenbok/Framer/pull/434/files#diff-5 (27)
M extras/Studio.framer/framer/framer.js
https://github.com/koenbok/Framer/pull/434/files#diff-6 (22234)
M extras/Studio.framer/framer/framer.js.map
https://github.com/koenbok/Framer/pull/434/files#diff-7 (2)
A extras/Studio.framer/framer/manifest.txt
https://github.com/koenbok/Framer/pull/434/files#diff-8 (84)
D extras/Studio.framer/framer/mirror.css
https://github.com/koenbok/Framer/pull/434/files#diff-9 (196)
A extras/Studio.framer/framer/preview.png
https://github.com/koenbok/Framer/pull/434/files#diff-10 (0)
A extras/Studio.framer/images/banner.png
https://github.com/koenbok/Framer/pull/434/files#diff-11 (0)
A extras/Studio.framer/images/bg.jpg
https://github.com/koenbok/Framer/pull/434/files#diff-12 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-13 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-14 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-15 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-16 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-17 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-18 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-19 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-20 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-21 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-22 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-23 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-24 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-25 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-26 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-27 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-28 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-29 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-30 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-31 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-32 (0)
A
<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-33 (0)
A<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-34 (613)
A<EMAIL_ADDRESS>https://github.com/koenbok/Framer/pull/434/files#diff-35 (614)
A extras/Studio.framer/modules/WindowComponent.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-36 (219)
M framer/Framer.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-37 (4)
A framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-38 (151)
A framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-39 (123)
M framer/Utils.coffee
https://github.com/koenbok/Framer/pull/434/files#diff-40 (8)

Patch Links:

https://github.com/koenbok/Framer/pull/434.patch
https://github.com/koenbok/Framer/pull/434.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/koenbok/Framer/pull/434, or mute the thread
https://github.com/notifications/unsubscribe-auth/AACbYjeOZSWmb_gMdLidO3lWBipbIMDSks5q1JhtgaJpZM4KZmKq
.

A setter for .value would be great, here. Eg. for prototyping an typeahead/autocomplete or an edit form with prefilled content etc.

Thanks a ton, @nvh. Will start working through these.

@awt2542 Added a setter for value in today's rundown.

@benjaminnathan nice! seems to work perfectly after the layer has been created but not as part of the constructor. eg.
a = new InputLayer
a.value = "this works"

b = new InputLayer
  value: "this doesn't"

Have you considered using offsetHeight and offsetWidth to measure the size
of the text?
I've found that to be much more efficient and accurate when compared to
Utils.textSize.
I'm doing that in a few of my prototypes with dynamic content. To simulate
a "flow" layout or to create dynamic width buttons etc.
I would suggest that you allow adding a inset variable as well so you can
simulate margin or padding without adding in another layer into the mix.
On Thu, Oct 20, 2016 at 2:08 PM Niels van Hoorn<EMAIL_ADDRESS>wrote:

@nvh commented on this pull request.
Strong start! A few general remarks:

Only add the files to the branch that are relevant to this Pull
Request, don't commit all the changes to Studio.framer.
There should be some tests for this. Ask me to show you how to
create them.
I tried giving pointers in the right direction for the solution, but
please let me know if I have been to vague.

In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

@@ -0,0 +1,123 @@
+{Layer} = require "./Layer"
+{Events} = require "./Events"

+class exports.TextLayer extends Layer
+

constructor: (options={}) ->

options.width ?= 300

options.backgroundColor ?= "transparent"

options.html ?= "Add text"

options.color ?= "#888"

This could be more efficient with by using _.defaults and passing the
result into super, just like you do in InputLayer
In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	currentDevice = Framer.Device.deviceType

	# Apple Device: SF UI

	if currentDevice.indexOf("apple") > -1

		@_setStyle("-apple-system, SF UI Text, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

	# Google Device: Roboto

	if currentDevice.indexOf("google") > -1

		@_setStyle("Roboto, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

	if currentDevice.indexOf("microsoft") > -1

		@_setStyle("Segoe UI, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

	# Else: macOS

	else

		@_setStyle("-apple-system, SF UI Text, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

I think there may be Utils functions to check for this, otherwise we
should create them and use them here.
In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	if currentDevice.indexOf("microsoft") > -1

		@_setStyle("Segoe UI, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

	# Else: macOS

	else

		@_setStyle("-apple-system, SF UI Text, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

if not @fontSize

	@_setStyle(@fontFamily, 40, @fontWeight, @lineHeight)

if not @fontWeight

	@_setStyle(@fontFamily, @fontSize, 400, @lineHeight)

if not @lineHeight

	@_setStyle(@fontFamily, @fontSize, @fontWeight, 1.25)

Instead of checking for each variable separately here, it would be better
to add the default to the getter in the @define of these properties
In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

if not @fontWeight

	@_setStyle(@fontFamily, @fontSize, 400, @lineHeight)

if not @lineHeight

	@_setStyle(@fontFamily, @fontSize, @fontWeight, 1.25)

# Reset width and height

if @autoWidth and not @autoHeight

	@_setSize(true, false)

if @autoHeight and not @autoWidth

	@_setSize(false, true)

if @autoWidth and @autoHeight

	@_setSize(true, true)

This can be one call:
@_setSize(@autoWidth, @autoHeight)

In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	@_setSize(false, true)

if @autoWidth and @autoHeight

	@_setSize(true, true)

_setStyle: (fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, textAlign, textTransform) =>

@style =

	fontFamily: fontFamily

	fontSize: "#{fontSize}px"

	fontWeight: "#{fontWeight}"

	lineHeight: "#{lineHeight}"

	letterSpacing: "#{letterSpacing}px"

	textAlign: textAlign

	textTransform: textTransform

_setSize: (width, height) =>

It's confusing to name these parameters width and height, even though they
are booleans specifying how you want the function to work
In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	lineHeight: @lineHeight

	letterSpacing: @letterSpacing

	textAlign: @textAlign

	textTransform: @textTransform

# Set width and height based on style

constraints = width: @width

if width and not height

	@width = Utils.textSize(@text, currentStyle).width

if height and not width

	@height = Utils.textSize(@text, currentStyle, constraints).height

if width and height

	@size = Utils.textSize(@text, currentStyle)

I'm unsure what exactly you want to do here, but why not specify the
constraints object conditionally, pass that into Utils.textSize, and
always set the result of that to @size
In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

@define "lineHeight",

get: -> @style.lineHeight

set: (value) -> @_setStyle(@fontFamily, @fontSize, @fontWeight, value, @letterSpacing, @textAlign, @textTransform)

@define "letterSpacing",

get: -> @style.letterSpacing

set: (value) -> @_setStyle(@fontFamily, @fontSize, @fontWeight, @lineHeight, value, @textAlign, @textTransform)

@define "textAlign",

get: -> @style.textAlign

set: (value) -> @_setStyle(@fontFamily, @fontSize, @fontWeight, @lineHeight, @letterSpacing, value, @textTransform)

@define "textTransform",

get: -> @style.textTransform

set: (value) -> @_setStyle(@fontFamily, @fontSize, @fontWeight, @lineHeight, @letterSpacing, @textAlign, value)

Why are you setting all the values every time?
You could do something like:
set: (value) -> @style.textTransform = value
right?
In Layer.coffee, there is a layerProperty function that does probably
exactly what you want. See if you can generalise that and make it public
outside of that file, just like @define https://github.com/define in
the BaseClass
In framer/Utils.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

@@ -434,6 +434,14 @@ Utils.deviceFont = (os) ->
return "Segoe UI" if os is "windows"
return "Helvetica"

+Utils.webFont = (font) ->

link = document.createElement("link")
link.href = "https://fonts.googleapis.com/css?family=#{font}"
link.rel = "stylesheet"
document.getElementsByTagName("head")[0].appendChild(link)

return font

The naming of this function can be improved in two ways. It should make
clear that:

We are loading the font or making it available somehow
It only loads fonts available through googles API.

What happens if we call this function twice for the same font?
Also: Returning the exact value that you provide as a parameter to a
function does usually not create good API's.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

+Events.InputFocus = "InputFocus"
+Events.InputBlur = "InputBlur"

+class exports.InputLayer extends TextLayer
+

constructor: (options={}) ->

_.defaults options,

	backgroundColor: "#FFF"

	width: 500

	height: 100

super options

# Layer containing input element

@input = new Layer

input is a very generic name, also this is not actually the input element,
but only contains it.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	height: 100

super options

# Layer containing input element

@input = new Layer

	backgroundColor: "transparent"

	x: 30

	width: @width - 60

	height: @height

	parent: @

	name: "input"

if not @multiLine

	@_inputElement = document.createElement("input")

else

In general, if you create an if-statement that has an else component,
it's better to not negate the condition.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	backgroundColor: "transparent"

	x: 30

	width: @width - 60

	height: @height

	parent: @

	name: "input"

if not @multiLine

	@_inputElement = document.createElement("input")

else

	@_inputElement = document.createElement("textarea")

	@input.y = 25

# The id serves to differentiate multiple input elements from one another.

# To allow styling the placeholder colors of seperate elements.

@_id = Utils.round(Utils.randomNumber(0, 100))

This is random, but not random enough. You can either:

Make the random id really unique by making it a UUID
https://en.wikipedia.org/wiki/Universally_unique_identifier
Keep track of the number of InputLayers globally, so you can
increment the value and have it always be unique (until you run out of
integers)

Or just look at the definition of the @id property on BaseClass and
realise that every instance of a class that subclasses from it already has
a unique id that you can use for this purpose.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

super options

# Layer containing input element

@input = new Layer

	backgroundColor: "transparent"

	x: 30

	width: @width - 60

	height: @height

	parent: @

	name: "input"

if not @multiLine

	@_inputElement = document.createElement("input")

else

	@_inputElement = document.createElement("textarea")

	@input.y = 25

Magic values like this need their own variable or some explanation in the
form of a comment.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	@_inputElement = document.createElement("textarea")

	@input.y = 25

# The id serves to differentiate multiple input elements from one another.

# To allow styling the placeholder colors of seperate elements.

@_id = Utils.round(Utils.randomNumber(0, 100))

@_inputElement.className = "input" + @_id

@on "change:width", =>

	@_inputElement.style.width =<EMAIL_ADDRESS>

# Append element

@input._element.appendChild(@_inputElement)

# Match TextLayer defaults and type properties

@_setTextProperties = =>

This could be defined like any other function on a class, instead of
defining it in the constructor.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	@_inputElement.style.lineHeight = @lineHeight

	@_inputElement.style.fontWeight = @fontWeight

	@_inputElement.style.color = @color

	@_inputElement.style.outline = "none"

	@_inputElement.style.backgroundColor = "transparent"

	@_inputElement.style.width = "#{@width - 64}px"

	@_inputElement.style.height = "#{@height}px"

	@_inputElement.style.cursor = "auto"

	@_inputElement.style.webkitAppearance = "none"

	@_inputElement.style.resize = "none"

@_setTextProperties()

# All inherited properties

@_textProperties =

	{@fontFamily, @fontSize, @lineHeight, @fontWeight, @color, @backgroundColor, @width, @height}

Why is this a property on the class if it isn't used anywhere besides here?
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	@_inputElement.style.height = "#{@height}px"

	@_inputElement.style.cursor = "auto"

	@_inputElement.style.webkitAppearance = "none"

	@_inputElement.style.resize = "none"

@_setTextProperties()

# All inherited properties

@_textProperties =

	{@fontFamily, @fontSize, @lineHeight, @fontWeight, @color, @backgroundColor, @width, @height}

for property, value of @_textProperties

	@on "change:#{property}", (value) =>

		@_setTextProperties()

		@_setPlaceholder()

See if you can achieve something similar by overriding the @_setStyle
function of TextLayer
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

@_setTextProperties()

# All inherited properties

@_textProperties =

	{@fontFamily, @fontSize, @lineHeight, @fontWeight, @color, @backgroundColor, @width, @height}

for property, value of @_textProperties

	@on "change:#{property}", (value) =>

		@_setTextProperties()

		@_setPlaceholder()

# If text has been defined, use that, otherwise default to placeholder

@_defaultText = @text

@_setPlaceholder()

This comment doesn't make a lot of sense to me, as there is no conditional
specified here. What is the "if" and what is the "otherwise"?
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

@_isFocused = false

# Default focus interaction

@_inputElement.onfocus = (e) =>

	@_inputElement.style.color = "#000"

	# Emit focus event

	@emit(Events.InputFocus, event)

	@_isFocused = true

# On blur event

@_inputElement.onblur = (e) =>

	# Emit blur event

	@emit(Events.InputBlur, event)

Aren't we forgetting something here?
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	@_isFocused = true

# On blur event

@_inputElement.onblur = (e) =>

	# Emit blur event

	@emit(Events.InputBlur, event)

@_inputElement.onkeyup = (e) =>

	# Check last character

	lastCharacter =<EMAIL_ADDRESS>- 1)

	# Exclude enter, shift, caps lock, control, alt, command etc.

	unless e.which in [13, 16, 17, 18, 20, 91, 93]

		@emit("change:value", @value)

		@emit(Events.InputValueChange, @value)

Maybe it's better to check if the value has actually changed since the
last time, then just excluding some keys.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

# Default focus interaction

@_inputElement.onfocus = (e) =>

	@_inputElement.style.color = "#000"

	# Emit focus event

	@emit(Events.InputFocus, event)

	@_isFocused = true

# On blur event

@_inputElement.onblur = (e) =>

	# Emit blur event

	@emit(Events.InputBlur, event)

@_inputElement.onkeyup = (e) =>

It's possible (and more nice) to do this with an event handler as well,
instead of setting the property of the element to a function.
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	@_inputElement.style.color = "#000"

	# Emit focus event

	@emit(Events.InputFocus, event)

	@_isFocused = true

# On blur event

@_inputElement.onblur = (e) =>

	# Emit blur event

	@emit(Events.InputBlur, event)

@_inputElement.onkeyup = (e) =>

	# Check last character

	lastCharacter =<EMAIL_ADDRESS>- 1)

What happens if the input is empty?
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	# Check last character

	lastCharacter =<EMAIL_ADDRESS>- 1)

	# Exclude enter, shift, caps lock, control, alt, command etc.

	unless e.which in [13, 16, 17, 18, 20, 91, 93]

		@emit("change:value", @value)

		@emit(Events.InputValueChange, @value)

	# If enter key is pressed

	if e.which is 13

		@emit(Events.EnterKey, event)

	# If backspace key

	if e.which is 8

		@emit(Events.BackSpaceKey, event)

I don't think Backspace deserves a capital 'S'
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

		@_setPlaceholder()

_setPlaceholder: =>

@_inputElement.placeholder = @_defaultText

unless @_isFocused

	@_inputElement.style.color =

		if @color? then @color else "#aaa"

	@_setPlaceholderColor(@_id, @color)

_setPlaceholderColor: (id, color) ->

document.styleSheets[0].addRule(".input#{id}::-webkit-input-placeholder", "color: #{color}")

@define "value",

get: -> @_inputElement.value

Maybe this one needs a setter as well
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	@_inputElement.style.color =

		if @color? then @color else "#aaa"

	@_setPlaceholderColor(@_id, @color)

_setPlaceholderColor: (id, color) ->

document.styleSheets[0].addRule(".input#{id}::-webkit-input-placeholder", "color: #{color}")

@define "value",

get: -> @_inputElement.value

@define "focusColor",

get: -> @_inputElement.style.color

set: (value) ->

	@onInputFocus ->

		@_inputElement.style.color = value

What happens if we call this setter multiple times?
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

		@emit(Events.InputValueChange, @value)

	# If enter key is pressed

	if e.which is 13

		@emit(Events.EnterKey, event)

	# If backspace key

	if e.which is 8

		@emit(Events.BackSpaceKey, event)

	# Revert to placeholder

	if @value is ""

		@_setPlaceholder()

_setPlaceholder: =>

@_inputElement.placeholder = @_defaultText

Is it necessary to set the placeholder value every time?
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	# Revert to placeholder

	if @value is ""

		@_setPlaceholder()

_setPlaceholder: =>

@_inputElement.placeholder = @_defaultText

unless @_isFocused

	@_inputElement.style.color =

		if @color? then @color else "#aaa"

	@_setPlaceholderColor(@_id, @color)

_setPlaceholderColor: (id, color) ->

document.styleSheets[0].addRule(".input#{id}::-webkit-input-placeholder", "color: #{color}")

Beware that this adds a rule to the stylesheet every time the placeholder
color is set
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

		@emit(Events.EnterKey, event)

	# If backspace key

	if e.which is 8

		@emit(Events.BackSpaceKey, event)

	# Revert to placeholder

	if @value is ""

		@_setPlaceholder()

_setPlaceholder: =>

@_inputElement.placeholder = @_defaultText

unless @_isFocused

	@_inputElement.style.color =

		if @color? then @color else "#aaa"

Shouldn't this default be specified in a variable somewhere?
Also this can be shortened to:
@_inputElement.style.color = @color ? "#aaa"
Notice the space between @color https://github.com/color and the
questionmark
In framer/InputLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

		@_setPlaceholder()

# If text has been defined, use that, otherwise default to placeholder

@_defaultText = @text

@_setPlaceholder()

# Override text property setting the html

@html = ""

# Check if in focus

@_isFocused = false

# Default focus interaction

@_inputElement.onfocus = (e) =>

	@_inputElement.style.color = "#000"

Shouldn't this color be configurable?
Also does it needs to be set every time the element focusses?
In framer/TextLayer.coffee
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061:

	if currentDevice.indexOf("microsoft") > -1

		@_setStyle("Segoe UI, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

	# Else: macOS

	else

		@_setStyle("-apple-system, SF UI Text, Helvetica Neue", @fontSize, @fontWeight, @lineHeight)

if not @fontSize

	@_setStyle(@fontFamily, 40, @fontWeight, @lineHeight)

if not @fontWeight

	@_setStyle(@fontFamily, @fontSize, 400, @lineHeight)

if not @lineHeight

	@_setStyle(@fontFamily, @fontSize, @fontWeight, 1.25)

Also if you're checking for variables to be set, always use @lineHeight?
(including the question mark). If you set @lineHeight to 0, if not
@lineHeight will be true
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/koenbok/Framer/pull/434#pullrequestreview-5149061,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACbYmBQRGAbib603XNULeSup44MvFbLks5q19hngaJpZM4KZmKq
.

--

Jordan Dobson

Character filtering update: New way of filtering works by actually checking if the value has changed, and only emits change events if it has. Safer and more scalable than specific filtering. See c739734.

@awt2542 Ah. So, to make the transition from Text to Input easy, I made text a setter of placeholder. So it's visually consistent. We can do text → input and value → actual value, but it needs more testing / usage to see if that actually makes sense in practice.

is there a way to test it before merge? I had some issues with autosize on different textmodules and ioskit from Kevyn. Want to test these cases

is there a way to clear input? field.value="" seems not working

also are you planning a function for manual focus on input?

🙃🚀

woohoo!

Any updates on the status of InputLayer, @benjamindenboer ?

OOOH. First I've heard of this.
On Tue, Apr 18, 2017 at 7:54 AM Marc Krenn<EMAIL_ADDRESS>wrote:

Any updates on the status of InputLayer, @benjamindenboer
https://github.com/benjamindenboer ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/koenbok/Framer/pull/434#issuecomment-294870595, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AACbYt85TLfnD9VAlvN6RmfSzZqVLBceks5rxM6dgaJpZM4KZmKq
.

--

Jordan Dobson


No OCR

I just deployed my first papermerge instance in a docker container as proposed
 docker run -p 8030:8000 -e PAPERMERGE__MAIN__SECRET_KEY=abc  -e DJANGO_SUPERUSER_PASSWORD=123    papermerge/papermerge:latest
I can log in and add some PDF, but no matter what I do, no OCR is happening. Not automatically, neither when I start the OCR manually. The OCR status indicator always stays grey.
What do I miss?

It is because you start only the web app part. For OCR you need to start the worker as well.
There can be only one web app part but as many workers you want.

Sorry, I am quite a noob on these things. I'd had assumed that everything is now in one container. If I start the worker in another container, how would they communicate? Does this mean I have to use the docker-compose setups to include the OCRs and only the single container?

It is because you start only the web app part. For OCR you need to start the worker as well. There can be only one web app part but as many workers you want.

How do I start the worker if the web app part is running?

In order to have full setup you need web app + worker.


copy sfincs results if it has been run for another scenario with the same hazard

FloodAdapt version checks

[X] I have checked that this issue has not already been reported.
[X] I have checked that this bug exists on the latest version of FloodAdapt.

Reproducible Example
recognizing that the same hazard has been run already but rerunning it again
Current behaviour
When running a scenario the Terminal says that simulation is reused but sfincs is run again
Desired behaviour
copy sfincs results from the other scenario to current scenario
Task list

[ ] in check if hazard has already been run add a copy function
[ ] skip re-running hazard in DirectImpacts.run()

Additional context
No response

done


KAFKA-14752: Kafka examples improvements - consumer changes

This is extracted from the original PR for better review. https://github.com/apache/kafka/pull/13492

@fvaleri , there is checkstyle failure. Could you fix it?
Execution failed for task ':examples:checkstyleMain'.

Thanks for the update. I'll merge it after CI build completed.

Failed tests are unrelated:
    Build / JDK 8 and Scala 2.12 / org.apache.kafka.connect.integration.ExactlyOnceSourceIntegrationTest.testConnectorBoundary
    Build / JDK 8 and Scala 2.12 / kafka.api.PlaintextConsumerTest.testMultiConsumerDefaultAssignorAndVerifyAssignment()
    Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.DedicatedMirrorIntegrationTest.testMultiNodeCluster()
    Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationSSLTest.testRestartReplication()
    Build / JDK 11 and Scala 2.13 / kafka.admin.AddPartitionsTest.testWrongReplicaCount(String).quorum=zk
    Build / JDK 11 and Scala 2.13 / org.apache.kafka.tools.MetadataQuorumCommandTest.[5] Type=Raft-Combined, Name=testDescribeQuorumReplicationSuccessful, MetadataVersion=3.5-IV2, Security=PLAINTEXT


Add dark mode

Closes #127
What's inside this PR ?
Dark mode support as requested in #127.
2 more changes were made :

Upgrade of docs-searchbar version inside thepackage.json (v1.3.0)
Removal of the surrounding .search-box div according to this PR

How to test ?
Run the playground
You can run the playground with yarn serve
Change the color palette
If you want to change the color palette, you can do so by changing the colors inside the playground/.vuepress/styles/palette.styl file
Enable / disable dark mode
You can also enable/disable the dark mode (disabled by default) by adding/removing the enableDarkMode option in the playground/.vuepress/config.js file (don't forget to restart the server !):

Screenshots
Column layout (default)

Simple layout

Change $msAccentDarkColor to #a29bfe (no impact on the rest of the page, no conflict with the vuepress-theme-default-prefers-color-scheme plugin)

Change $msAccentDarkColor and $accentDarkColor to #a29bfe (full change of the dark theme, cohabitation with the vuepress-theme-default-prefers-color-scheme plugin)

# At the root of the plugin (vuepress-plugin-meilisearch for me):

`yarn link`

#Inside the playground folder:

rm -rf node_modules
# Remove the vuepress-plugin-meilisearch from the playground/package.json
yarn link "vuepress-plugin-meilisearch"
yarn

This shouln't be necessary as the playground is already connected to its root folder that contains the plugin.

There is no vuepress-plugin-meilisearch in the package.json in the playground

https://github.com/meilisearch/vuepress-plugin-meilisearch/blob/5536a3667d47a9955b2eb008a5783a7af3cc82d9/playground/package.json#L12

But in config.js it takes its root from the parent directory
module.exports = {
  title: 'Welcome to the Playground!',
  plugins: [
    [
      require('../../index.js'),
      {
        // Testing with MeiliSearch documentation content (https://docs.meilisearch.com/)
        hostUrl: 'https://docs-search-bar.meilisearch.com',
        apiKey:
          'd79226ae89f29d4dadba8d0c30c240e435f584fb83a7ae573b13eb62edec35cd',
        indexUid: 'docs'
        // "maxSuggestions": 10,
        // "placeholder": "Search as you type..."
      }
    ]
  ]
}

not the plugin that is in the package.json apparently but should not have any impact since it is not used in the playground

Awesome!

How is it going to be for VuePress website that does not the dark mode allowed, for example our docs?
Does it work with https://github.com/tolking/vuepress-theme-default-prefers-color-scheme as the issue #127 mentions it?

It provides the same option as in docs-searchbar enableDarkMode, I'm going to add this to the body of the PR :)
Yes it does ! I provided examples in the screenshots section (the screenshots in purple are the one you are looking for)

In the config.js from the playground: the plugin takes its root from the parent directory
module.exports = {
  title: 'Welcome to the Playground!',
  plugins: [
    [
      require('../../index.js'),
      {
        // Testing with MeiliSearch documentation content (https://docs.meilisearch.com/)
        hostUrl: 'https://docs-search-bar.meilisearch.com',
        apiKey:
          'd79226ae89f29d4dadba8d0c30c240e435f584fb83a7ae573b13eb62edec35cd',
        indexUid: 'docs'
        // "maxSuggestions": 10,
        // "placeholder": "Search as you type..."
      }
    ]
  ]
}

not the plugin that is in the package.json. The plugin in the package.json should not have any impact in the playground since it is not used in the config file

Ok I got it.
I didn't managed to make it work this way, so I thought they weren't linked together. The method described in the body of the PR was the only way to make it work.
I took a look at it, and the docs-searchbar used in the playground was the old one (without the enableDarkMode option), so it obviously couldn't work 😀
The problem was the vuepress-plugin-meilisearch in the playground/package.json. As it was in v0.0.6, it also used the wrong version of docs-searchbar. After removing this useless dependency, there is not problem anymore 🎉
I'm updating the body of the PR according to this.
Thanks for pointing out this problem ! ❤

Can you update the README according to your new feature? 🙂

It's already done 🤩
I added a Dark mode section inside the Customization one

My bad! I completely missed it in the middle of the files 😅

I looked at the default palette of vuepress and it seems it is using the variable used by default-prefers-color-scheme.
See Styling in VuePress.
Furthermore there is a default palette provided by vuepress. I think it is possible  to rely on these values to have default values.
As an example, if we look at the default search bar component that is provided by vuepress it lets us tweak with the following variable.
$accentColor = #3eaf7c
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
$arrowBgColor = #ccc

Because of that, I think we should be consistent with these variable naming and our variables by just adding dark and not use ms.
It seems that we can use vuepress default theme to avoid the previous error.

So I tried with and without the dark theme and it worked, I'm not sure what provoked the bug the first time around:
Update styles/palette.style to comply to naming convention (see previous comment)
$accentDarkColor ?= $accentColor

$inputDarkBgColor ?= #444d52

$textDarkColor ?= #eaeaea

$borderDarkColor ?= lighten($inputDarkBgColor, 10%)

$dropdownBgDarkColor ?= darken($inputDarkBgColor, 25%)

Play with ./vuepress/styles/palette.style
// No need to define accentColor, works in both cases
$accentDarkColor = $accentColor // $accentColor comes from default vuepress theme see link below

$inputDarkBgColor = #444d52
$textDarkColor = #eaeaea
// $borderDarkColor needs to have inputDarkBgColor defined as information goes down to the plugin palette, so it is not aware that this variable exists since it does not exists in both the default palette and the palette from the dark-theme
$borderDarkColor = lighten($inputDarkBgColor, 10%)

default vuepress palette
Other changes this emply:

[ ] changing the names in MeiliSearchVueBox
[ ] changing the names in README

Unless there is another reason not to go with these variable names?

We agreed with @bidoubiwa to rename the style variable by removing the ms- prefix.
It's now done 🚀

bors merge

bors merge


math-style and version

Description
The optional argument math-style=upright also depends to another font, here XITS.
Is this the intended behaviour that the option is set global?
Check/indicate

[x] Relevant for XeTeX
[x] Relevant for LuaTeX
[x] Issue tracker has been searched for similar issues?
[ ] Links to <tex.stackexchange.com> discussion if appropriate

Minimal example demonstrating the issue
\documentclass{standalone}
\usepackage{unicode-math}
\setmathfont[math-style=upright,version=Euler]{euler.otf}
\setmathfont[version=XITS]{XITS Math}
\begin{document}
\mathversion{Euler}
	$xy \sqrt[a]{b}$

\mathversion{XITS}
	$xy \sqrt[a]{b}$
\end{document}

Further details
up-to-date TL2018

I would say not, thanks for the report. math-style predates version so I wouldn't have considered the interaction. (I think there are quite a few similar problems with the version feature.)
Unfortunately I won't have the chance to look into this until later in the year... I guess in the mean time that the math-style can be explicitly set each time? Alternatively in might work to run \unimathsetup{math-style=upright} after the final \setmathfont.


Forever config file support

The config file may like this
forever.js

var request= require("request");
module.exports = {
index: "index.js"
, logFile: "forever.log"
, outFile: "out.log"
, onStart: function(){}
, onStderr: funtion(err){ request("http://url/tellme"); }
};

Then:
forever -f forever.js

This is an interesting idea.  If you or anyone else wanted to make a pull request, we could definitely get something like this implemented.


Crash by entering the world

When i connect to my world the game is crashing
MC 1.12.2
Latest Forge
https://paste.ee/p/awGoG

Paste not found!

same problem

I have this problem too
Controllable does not work with Obfuscate
which is the dependence of Vehicles and Guns
Without Obfuscate, Controllable works

Same. Crash when entering world. Both SP and MP.
Controller: XBox360
Modpack: Uncle Genny's
MC: 1.12.2
Forge: <IP_ADDRESS>54
Controllable: 0.8.0
Weather: Overcast with some rain
Pastebin: https://pastebin.com/C0zUAfYk

Unfortuantely I don't support 1.12 anymore but this is an issue between the Gun Mod and Contollable. You'll want to downgrade to anything before 0.8.0 for it to be fixed.

Unfortuantely I don't support 1.12 anymore but this is an issue between the Gun Mod and Contollable. You'll want to downgrade to anything before 0.8.0 for it to be fixed.


Dashboard becomes slow with many clients

In my setup, I have 130+ backend services, and each of these is represented by a separate client in linkerd. At this number of clients, the dashboard slows to the point of being unusable. I'm not a front-end engineer and I haven't investigated this hypothesis, but I suspect this is due to the number of charts being updated in real-time.

Seems quite likely! Let me try making the clients collapsible as you mentioned in slack, so that for large numbers of clients this page isn't doing so much.


Instructions to build it

Can you add your instructions on how to build it?

The purpose of this repo is to provide compact static libs for webrtc on iOS platform through the cocapods (x86 simulator and x64 device). Considering building libraries from sources you may check this link http://www.webrtc.org/native-code/ios. I am still in progress with building process. It takes quite a long time to grab the repo from server. After completion it might be useful to create another repo with sources and .xcodeproj files.


Add snapshot tests

Issue
Increase confidence in code changes
Details

Add snapshot testing
Evaluate if image snapshot testing is also possible

Added in https://github.com/WeTrustPlatform/paramount/commit/46f1225d63e599ef38d3184610aa43b6da42bc60


Unexpected behavior while navigating from Folders activity to Accounts activity

While navigating from the Folders activity to the Accounts activity, if we use the button provided on the top-left corner to navigate through the folders activity to accounts activity it will work as expected. But here's the catch. It won't navigate to the accounts activity on tapping the back button of your smartphone.  The back button unexpected behavior happens only when tapping it first before going to Accounts activity. Detailed steps to reproduce this are given below.
Expected behavior
On tapping back button for first time also it should navigate to the Accounts activity.
Actual behavior
On tapping back button of your smartphone before using the on screen button provided in the application, it will close the application.
Steps to reproduce

Launch the application and goto folders page.

Tap the back button of your smartphone and it will close the application.
Now relaunch the application and again follow the step-1 and this time instead press the back button provided on the top-left corner of the screen(Left side of Folders) to goto Accounts activity.

Now click on the account and get back to Inbox activity.

Now again follow step 1-2. This time on tapping the back button of your smartphone you will be redirected to the Accounts activity instead of closing the application.
Now you can tap back button or click on provided button any number of times from Folders activity, it won't kill the application. Now close the application and relaunch again and tapping back button will close the application again. But if you follow steps 1-3-4 first then this won't happen.

Environment
K-9 Mail version: 5.115
Android version: 5.1.1

@philipwhiuk @cketti Can I send a PR for this issue as I have already solved this issue?

This may be unexpected, but it's not a bug. The back button goes to the previously displayed screen, the up button (top left corner of the screen) navigates up in the navigation hierarchy.
This will change during the design overhaul, precisely because it's confusing.

@cketti then why close the issue? Why not add Design Overhaul milestone to it?

We will change the navigation hierarchy of the app so this will no longer be an issue. Not implement the change you suggested.


Simplification of the code

The current version works in SP11, but is incredibly complicated. By using getIdentityList you can save 50% of the code.

You´re right! I always wrote a lot of commenting to this code construct, as I always forgot myself how it works. I never came to the idea of just simplifying this one.


Flying: Changing height costs slightly more/less

Endurance not consumed when changing heights

And movement up should cost 100% more (i.e. 2" of movement for 1" of altitude) unless flight is purchased with "No Gravity Penalty"

See #295 which is related to changing height and the increased distance/endurance for it.


Adding new property to Advanced Message Received Event

Choose a PR Template
Switch to "Preview" on this description then select one of the choices below.
Click here to open a PR for a Data Plane API.
Click here to open a PR for a Control Plane (ARM) API.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Microsoft.ApiCenter

@microsoft-github-policy-service agree company="Microsoft"
From: microsoft-github-policy-service[bot] @.>
Sent: Wednesday, December 4, 2024 10:13 AM
To: Azure/azure-rest-api-specs @.>
Cc: Gunam Rangasamy @.>; Mention @.>
Subject: Re: [Azure/azure-rest-api-specs] Adding new property to Advanced Message Received Event (PR #31742)
@grangasamy-msfthttps://github.com/grangasamy-msft please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]
Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@microsoft-github-policy-service agree

(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term "You" includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement
Contribution License Agreement
This Contribution License Agreement ("Agreement") is agreed to by the party signing below ("You"),
and conveys certain license rights to Microsoft Corporation and its affiliates ("Microsoft") for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

Definitions.
"Code" means the computer software code, whether in human-readable or machine-executable form,
that is delivered by You to Microsoft under this Agreement.
"Project" means any of the projects owned or managed by Microsoft and offered under a license
approved by the Open Source Initiative (www.opensource.orghttp://www.opensource.org/).
"Submit" is the act of uploading, submitting, transmitting, or distributing code or other content to any
Project, including but not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
discussing and improving that Project, but excluding communication that is conspicuously marked or
otherwise designated in writing by You as "Not a Submission."
"Submission" means the Code and any other copyrightable material Submitted by You, including any
associated comments and documentation.
Your Submission. You must agree to the terms of this Agreement before making a Submission to any
Project. This Agreement covers any and all Submissions that You, now or in the future (except as
described in Section 4 below), Submit to any Project.
Originality of Work. You represent that each of Your Submissions is entirely Your original work.
Should You wish to Submit materials that are not Your original work, You may Submit them separately
to the Project if You (a) retain all copyright and license information that was in the materials as You
received them, (b) in the description accompanying Your Submission, include the phrase "Submission
containing materials of a third party:" followed by the names of the third party and any licenses or other
restrictions of which You are aware, and (c) follow any other instructions in the Project's written
guidelines concerning Submissions.
Your Employer. References to "employer" in this Agreement include Your employer or anyone else
for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
Submission is made in the course of Your work for an employer or Your employer has intellectual
property rights in Your Submission by contract or applicable law, You must secure permission from Your
employer to make the Submission before signing this Agreement. In that case, the term "You" in this
Agreement will refer to You and the employer collectively. If You change employers in the future and
desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
and secure permission from the new employer before Submitting those Submissions.
Licenses.

Copyright License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
parties.
Patent License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
Your patent claims that are necessarily infringed by the Submission or the combination of the
Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
import or otherwise dispose of the Submission alone or with the Project.
Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
granted by implication, exhaustion, estoppel or otherwise.

Representations and Warranties. You represent that You are legally entitled to grant the above
licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
have disclosed under Section 3). You represent that You have secured permission from Your employer to
make the Submission in cases where Your Submission is made in the course of Your work for Your
employer or Your employer has intellectual property rights in Your Submission by contract or applicable
law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
You later become aware that would make Your representations in this Agreement inaccurate in any
respect.
Information about Submissions. You agree that contributions to Projects and information about
contributions may be maintained indefinitely and disclosed publicly, including Your name and other
information that You submit with Your Submission.
Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
defenses of lack of personal jurisdiction and forum non-conveniens.
Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
supersedes any and all prior agreements, understandings or communications, written or oral, between
the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-rest-api-specs/pull/31742#issuecomment-2518188597, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BMNT4MEEO4NKP2BNXQA2IQ32D5A4DAVCNFSM6AAAAABS65J66OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJYGE4DQNJZG4.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Hi @grangasamy-msft, you will need to generate the swagger and commit it as well. Please see https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents#for-service-system-events-pr-approval


Errors moving to Angular 5 with AngularCli from a working Angular 4 project

Hello,
As in subject i found error moving from Angular 4.2.5 working project to Angular  ^5.0.0 in AngularCli.
2 Warnings and 1 Error
Error:
Uncaught Error: Unexpected value 'GaugesModule' imported by the module 'DashModule'. Please add a @NgModule annotation.
Change from import { GaugesModule } from 'ng-canvas-gauges/lib';
to import { GaugesModule } from 'ng-canvas-gauges/src';
generate other errors.
Warnings:
./node_modules/ng-canvas-gauges/node_modules/<EMAIL_ADDRESS>5659:15-36 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/ng-canvas-gauges/node_modules/<EMAIL_ADDRESS> @ ./node_modules/ng-canvas-gauges/lib/index.js

./node_modules/ng-canvas-gauges/node_modules/<EMAIL_ADDRESS>5675:15-102 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/ng-canvas-gauges/node_modules/<EMAIL_ADDRESS> @ ./node_modules/ng-canvas-gauges/lib/index.js

Same error with Angular ^5.2.0

Same here... solution ?

for angular 5, it did not build the GaugeModule in the lib. Instead I modified component.js to explicitly include the two sub components
old
exports.GaugesModule = require('./lib/gauges-module').GaugesModule;
new
exports.RadialGaugeComponent = require('./lib/radial-gauge').RadialGaugeComponent;
exports.LinearGaugeComponent = require('./lib/linear-gauge').LinearGaugeComponent;
See also Issue 3 if you want to build in prod mode


Add CHEAPOREP calculations

https://github.com/filecoin-project/research/issues/106

Ubercalc now belongs in Filecoin spec.


Change default mysql collation to utf8mb4_general_ci

The Problem/Issue/Bug:
In TYPO3 slack we studied extensively why a few collation variables weren't the utf8mb4_general_ci variables we expected.
How this PR Solves The Problem:

change collation-server, which also results in the default database creation with the correct collation.
add init_connect='SET collation_connection = utf8mb4_unicode_ci', which auto-changes the client connection.

Manual Testing Instructions:

Delete your existing database or create a new project. mkdir testcoll && cd testcol && ddev config --project-type=php && ddev start
echo "SHOW VARIABLES LIKE 'coll%';" | ddev mysql

You should see all collation variables being utf8mb4_general_ci
$ echo "SHOW VARIABLES LIKE 'coll%';" | ddev mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
Variable_name	Value
collation_connection	utf8mb4_unicode_ci
collation_database	utf8mb4_general_ci
collation_server	utf8mb4_general_ci

You should see
Automated Testing Overview:

Related Issue Link(s):
Release/Deployment notes:

@jeffsheltren would appreciate your review of this one, thanks!

Thanks @jeffsheltren  - this will go into v1.15+

Artifacts for anybody to test this are at https://app.circleci.com/pipelines/github/drud/ddev/2038/workflows/d9c246c8-3c04-4f00-97c9-fc6a2440b06d/jobs/24242/artifacts


feature request: add zoom in and zoom out event for scheme page inside projects tab

hi,
first thanks for the new version.
after installing it I remember it needs  a zoom in and zoom out event for scheme page specially on low-resolution monitors like my laptop

as u can see this project has not many containers but still its ui is a bit messy

Why youр didn't make well-ordered containers on the scheme? The containers are draggable.

when I open this page it will show containers like this, ordering all containers every time is a bit painful especially on a project with more containers (imagine a micro-service system which has one DB and all other services connect to it, it is too big)
this was just a sample to show it can be useful to have zoom event or even scroll bars

Hm. It's strange because we save containers position on Scheme. On your screenshot containers not have default position (you moved them before).
The default position of containers looks like this

You have the scroll bar.

this is what I see in my linux when I open the app without moving anything

Hi. Send me pls your yml config, I'll check on my side.

it had been sent

any progress?

@igor-lemon any news on this one?


How to fix all your installing/importing errors

To get started you are going to want to download anaconda for faiss, to do that I would recommend watching a yt video or just use the thing on there website at https://www.anaconda.com
now that we have that out of the way lets show you how to fix all the errors with installing.
all you have to do is just pip install then the name of your error so if you cant find Bard then you would do pip install GoogleBard
sometimes the name wont be correct and if that is the case then just look it open on google and you will most likely see a website called https://pypi.org which will you give the right command
if you have any other issues then make a comment on this and I will try my best to help you

Hi
I was installing requirements and I faced this and stopped
Downloading torch-2.0.1-cp38-cp38-manylinux1_x86_64.whl (619.9 MB)
|████████████████████████████████| 619.9 MB 91 kB/s eta 0:00:01Killed

Hi I was installing requirements and I faced this and stopped Downloading torch-2.0.1-cp38-cp38-manylinux1_x86_64.whl (619.9 MB) |████████████████████████████████| 619.9 MB 91 kB/s eta 0:00:01Killed

try using conda instead of pip


Use pack build command in readmes not pika build

Looks like these are the old build commands :)

😜 great catch! thanks!


[generator] Phase 2: Don't check in autogenerated content into Git

Continues on the effort of making the generator more developer-friendly :smile:
Previous PR was https://github.com/cloud-native-nordics/meetups/pull/92
This PR:

Simplifies the code a bit (many PRs needed for the end goal here sigh)
Ditches to check in autogenerated content; it's fetched (in parallel) upon starting the program
Unifies make and make stats so they don't become out of sync; now stats.json is always performed upon running make
Adds the meetup group's photo and description in the types, something we can use later

cc @kaspernissen @netumoliver

I will merge this now.


WebRTC in Red

From @HaakonME on July 8, 2013 20:54
https://friends.mayfirst.org/display/marxistvegan/717970 announced that Tobias has made a WebRTC addon for Friendica, available at https://github.com/friendica/friendica-addons/tree/master/webrtc
WebRTC in Red can enable one-way or two-way audio and video channels for users with up-to-date browers.
Copied from original issue: friendica/red#72

@HaakonME This issue is closed because Redmatrix evolved into Hubzilla. When this is still an issue in the most recent version of Hubzilla, please recreate this issue over there. We're sorry for any inconvenience this will maybe give you.


Download pdf not working

Seems like the download starts before the page is rendered

hmmm, fair. Working when I integrated. Let's see if I can come to a conclustion

This is from daily-code repo right?

yep

@devsargam Are you solving this issue?

@hkirat Sometimes its working and sometimes its not working.

I am trying to figure it out. If u want u can do it as well. Idk what's going wrong. I can see the page is not rendering fast enough. Feel free to take this up

Hi @hkirat this issue is related to loading of data.
Your print method for pdf generation is being called before your page is even render properly that why it is not able to read the page content to create the pdf.
I tried to debug and solve the issue by letting the page to render properly and then print the content in pdf form.

Can you please assign this to me.

@vikasu16, I was the person who was responsible for the pr that failed to do so. What was ur approach btw? Just wanted to know how u fixed it?
Did u wait for the elements to render
Or
Wait for certain time interval?

@devsargam to generate the pdf you need to have all the elements loaded on the page so the print function can read the html tags and make the pdf from it.
I just passed the condition to let the page load before it makes the pdf.

PR raised on daily code repo.
https://github.com/code100x/daily-code/pull/88


Add new pattern for sorting FilePairs by sample name

What do you think of it now, @pditommaso ?

Awesome


Let Go copy TLS config values.


Add Brewfile

This PR creates a Brewfile. A Brewfile in the project will let developers run brew bundle to install required dependencies automatically, or brew bundle check to determine if these dependencies are already installed.

LGTM, is it possible to provide version in Brewfile similar to Gemfile?

LGTM, is it possible to provide version in Brewfile similar to Gemfile?

Unfortunately no, it looks like Homebrew can only install the most recent version.

Thanks!


import checks in CI

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master     #3   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          12     12
  Lines         187    187
=====================================
  Hits          187    187

Impacted Files
Coverage Δ

app/models.py
100% <ø> (ø)
:arrow_up:

app/config.py
100% <100%> (ø)
:arrow_up:

app/db.py
100% <100%> (ø)
:arrow_up:

app/__init__.py
100% <100%> (ø)
:arrow_up:

tests/test_models.py
100% <100%> (ø)
:arrow_up:

app/exception_handlers.py
100% <100%> (ø)
:arrow_up:

app/routes.py
100% <100%> (ø)
:arrow_up:

app/endpoints.py
100% <100%> (ø)
:arrow_up:

tests/test_endpoints.py
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78563eb...e68d6e8. Read the comment docs.


Getting started guide step 4 Inject Firebase, confusing term

on step 4 it says
"Open /src/app/<my-app>.component.ts..."
that file doesn't exist after running ng new
Perhaps instead of "Open" it should say "create?"
my setup:
$ ng -v
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: darwin x64

Here is where I am looking...

The <> means it's variable. The Angular CLI used to print out your app's name in the file path. Now it's just app for the root component. We'll remove this in the upcoming release, but the actual project structure is still the same.

Hmm, I'm still confused then, just in a new way. I was thinking that the  variable would have been replaced. In my example above it would have been ang2fb.componet.ts.  Since 'ang2fb' was what I called my project.  No matter what I start the project out being called, it always names that file app.componet.ts .  It doesn't vary, which is counter to the meaning of the word 'variable.'
BTW, I'm not trying to convince you that I'm right.  I'm trying to explain the nature of my confusion.

To add to my confusion.  Look at the step labeled - 4. Inject AngularFire:
If we go with, '' is a variable that in this instance means 'app'.  Then as was discussed above, .componet.ts becomes app.component.ts.  Fine.
But then,
selector: '-app',
becomes 'app-app'.  Are we really calling the selector 'app dash app?'
import { Component } from '@angular/core';
import { AngularFire, FirebaseListObservable } from 'angularfire2';
@Component({
moduleId: module.id,
selector: 'app-app',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css']
})
export class appComponent {
constructor(af: AngularFire) {
}
}

@davideast Also confused here

@lebsral @rememberlenny
I think I have discovered the source of the confusion. This is new to the webpack branch of the CLI.
If you use that branch it generates the app folder.
npm install angular-cli@webpack -g

@davideast That might have fixed it.
I got further and got different errors.  Which I think are related to the CLI and not firebase itself so I posted it here
https://github.com/angular/angular-cli/issues/2147
from my perspective you can close this issue.

@davideast Whatever discussed above has been taken care and the documentation has been updated. I guess this issue can be closed now.


MVP Target

FRONT END
(BOOT STRAP)
First Screen:
Login screen (cant do anything without logging in)
Manager Screen:
can do a write up
>modal pop up where they see a drop down for: employees, writes up they can do
can do a warning
>modal pop up where they see a drop down for: employees, writes up they can do
can see if someone hasn't accepted punishment
>list on page as they login of members with pending punishment
Employee Screen:
can see actions against them or positive comments
when employee has punishment can add comment/ see comment chain
MODELS
User

name
email
password
*passport authentication for manager/employee
Comment
who wrote comment
content
timestamp
Write ups
type
relation to employee (foreign key)
Acknowledge status
Warnings
type
relation to employee (foreign key)
Acknowledge status

BACKEND
GET routes
Employee side

needs to check to any actions against them
can click on an action against them and see what it is

Post routes

comment on punishment

UPDATE route
acknowledge punishment
Manager side
GET Routes

sees punishments pending

DELETE route

can delete pending punishments if want

Post routes
Can send out punishments
can comment

https://eventtracker.onrender.com


transactions have the wrong sender address  v0.10.1

Can you describe it in more detail? Let's follow your steps to reproduce this problem

I spammed some addresses with transactions(bot). I noticed that the addresses of the sender / receiver in the dashboard sometimes did not match. It is displayed correctly in the transaction details and in Explorer.
This applies to transactions by the bot as well as normal transactions that took place at a different time.
I have sent both XYM and other mosaics(with different divisibility).

The wallet is probably using the signer field to identify the sender and in cases of multisig, this could be wrong.
To be fixed.

related to #482 and fixed with #483 to be merged soon :+1:
Thank you for the report @garm01, I will ping back when a release includes this fix :+1:

@garm01 it should be fixed. Please verify and let me know if the problem still exists.


Allow to disable some theme-aware properties of sx

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Summary 💡
Allow to disable some feature of sx in theme.
Examples 🌈
Theme config
const theme = createTheme({
  sx: {
    border: ...,
    grid: ...,
    palette: ...,
    sizing: false, // disable sizing feature
    spacing: ...,
    ...
  }
})

Result
<Box sx={{ width: 1 }}> // Equivalent to width: '1px'

Motivation 🔦
I want to disable sizing feature from theme-aware properties of sx.
So when I set width: 1 it will  resolves to width: '1px' instead of width: '100%'

Thanks for the issue. Is this related specifically for the sizing and the usage of the value 1 or are there other use-cases you have in your codebase?
It kind of reminds me of https://github.com/mui/material-ui/issues/33525 (although not too much related), which is about changing the behavior of the sx prop. I almost feel like people should be able to provide their own sx style function (maybe as part of the team), which would override the default behavior. cc @siriwatknp for thoughts (we are already kind of doing this in the Material UI and Joy UI, but maybe we should go one step further and allow this in userland too).

My original problem is only about the sizing.
But I think it would be great if we could customize the behavior of sx in userland.
So we can solve various issues without waiting for the official release.
In the example, we can customize the spacing of sx to support for aliases.
import { spacingDefaultTransform } from<EMAIL_ADDRESS>
const spacingAliases = {
  xs: '4px',
  s: '8px',
  m: '16px',
  ...
}

const theme = createTheme({
  sx: {
    sizing: false, // disable sizing, do not transform the value
    spacing: (value) => {
      return spacingAliases[value] ?? spacingDefaultTransform(value);
    },
  }
})

<Box sx={{
  width: 1, // 1px
  marginTop: 'xs', // 4px
  padding: 's', // 8px
  gap: { xs: 's', md: 'm' }, // { xs: '8px', md: '16px' }
}}>

Interesting, the comment you've added is very similar to the other issue (unless you were proposing API for that particular issue). It's definitely interesting problem. In that case, I am closing this issue in favor of https://github.com/mui/material-ui/issues/33525 Please share your thoughts there and upvote that issue :)


Fix mvn artifactId

@MartinBrugnara thanks a lot for you improvements. We are using a Apache 2 CLA for ArangoDB, which can be found here: https://www.arangodb.com/documents/cla.pdf
We have not been able to set of an electronic system yet. Can you sign, scan and email it to cla (at) arangodb.com?
Thanks a lot
Willi

@dothebart done.

Thanks a lot!


DOI and Snapshotting

Putting together the DOI and snapshotting features.

Needs integration tests, having some trouble getting zenodo linking to work at the moment and so haven't tested it end to end.

Just going off the screenshots:

Your screenshots have 3 ways of referring to the version: 1.2.0, this version: 1.1.0, and this version 1.1.0. I actually prefer a 4th way :), just simpleversion x, e.g., are you sure you'd like to create a snapshot for version 1.2.0, but whichever way you pick should be consistent.
I like the bold for the version.
You probably just haven't got to it yet, but the other thing we'd talked about was a DOI column.

BTW, because there are a fair amount of PRs floating around, I believe most people go off Review Requests in the GitHub UI (at least I typically do), so if you want more feedback (?) I would recommend assigning reviewer(s). Even though you mentioned this at standup and on Slack, most of us will just go off of what we see assigned in GitHub. I just happened to remember randomly. :)

I believe most people go off Review Requests in the GitHub UI (at least I typically do), so if you want more feedback (?) I would recommend assigning reviewer(s). Even though you mentioned this at standup and on Slack, most of us will just go off of what we see assigned in GitHub. I just happened to remember randomly. :)

Worse(?) I usually just look at notifications so don't feel shy about unassigning/assigning people or re-requesting reviews.

For the last screenshot, while DOIs cannot be undone, much of the data in the DOI can be edited since we're using the user's own credentials. Maybe the language should make that more clear and/or link to a page using an info button to readthedocs (can create a stub in advance and fill out later).

Opening this for a quick review/merge. Upcoming PR will add tests and better usability.


How to fix this ?

We couldn't connect to 'https://huggingface.co/' to load this model, couldn't find it in the cached files and it looks like /content/vae/stablediffusion.vae.pt is not the path to a directory containing a file named diffusion_pytorch_model.bin or
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/diffusers/installation#offline-mode'.
retry with subfolder='vae'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/diffusers/modeling_utils.py", line 605, in _get_model_file
model_file = hf_hub_download(
File "/usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
validate_repo_id(arg_value)
File "/usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_validators.py", line 166, in validate_repo_id
raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/content/vae/stablediffusion.vae.pt'. Use repo_type argument if needed.
During handling of the above exception, another exception occurred:

which notebook is this?

which notebook is this?

Getting same error in Kohya LoRA Dreambooth


[Error in login_required decorator] How to access loggedin user's information in a resolver?

Hi,
For authenticating queries I have used the decorator @login_required on my resolver following way:
#app.py

class Query:
      user_info: UserInfo = strawberry.field(resolver=get_user_info)

#resolver.py
from strawberry_django_jwt.decorators import login_required

@login_required
def get_user_info(self, info: Info) -> UserInfo:
    response = UserInfo(...)
     print(info)
     return response

I have written a test using requests library in python that calls this query with authorization token passed via header. It successfully goes through to the resolver after authentication of the token.
The print(info) line is throwing the following error.
%d format: a number is required, not NoneType
How do we access the user who is loggedin at resolver? The information should be available in the info object right ?
@KundaPanda I tried using the latest version of the package. Can you please check and let me know what is incorrect in this flow?
Thanks.

Full traceback of the issue.
 `Traceback (most recent call last):

File "$PATH/env/lib/python3.7/site-packages/graphql/execution/execute.py", line 617, in resolve_field
result = resolve_fn(source, info, **args)
File "$PATH/env/lib/python3.7/site-packages/strawberry/extensions/directives.py", line 49, in resolve
result = _next(root, info, *args, **kwargs)
File "$PATH/bestinhere-api/bihapi/relay_id.py", line 19, in resolve
result = _next(root, info, *args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry_django_jwt/middleware.py", line 119, in resolve
return _next(root, info, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry/schema/schema_converter.py", line 394, in _resolver
return _get_result(_source, strawberry_info, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry/schema/schema_converter.py", line 387, in _get_result
source, info=info, args=field_args, kwargs=field_kwargs
File "$PATH/env/lib/python3.7/site-packages/strawberry/field.py", line 287, in get_result
return self.base_resolver(*args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry/types/fields/resolver.py", line 39, in call
return self.wrapped_func(*args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry_django_jwt/decorators.py", line 69, in wrapper
return func(ctx, *args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry_django_jwt/decorators.py", line 89, in wrapper
return dispose_extra_kwargs(f_with_info)(*args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry_django_jwt/decorators.py", line 324, in wrapper
return fn(src, *args, **passed_kwargs)
File "$PATH/bestinhere-api/users/resolver.py", line 73, in get_viewer
print(info, "info")
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dataclasses.py", line 357, in wrapper
result = user_function(self)
File "", line 3, in repr
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/collections/init.py", line 424, in repr
return self.class.name + repr_fmt % self
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dataclasses.py", line 357, in wrapper
result = user_function(self)
File "", line 3, in repr
File "$PATH/env/lib/python3.7/site-packages/django/http/response.py", line 337, in repr
'content_type': self._content_type_for_repr,
TypeError: %d format: a number is required, not NoneType
Stack (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 720, in init
self.handle()
File "$PATH/env/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 176, in handle
self.handle_one_request()
File "$PATH/env/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 201, in handle_one_request
handler.run(self.server.get_app())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "$PATH/env/lib/python3.7/site-packages/django/contrib/staticfiles/handlers.py", line 76, in call
return self.application(environ, start_response)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/wsgi.py", line 133, in call
response = self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 130, in get_response
response = self._middleware_chain(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/utils/deprecation.py", line 117, in call
response = response or self.get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "$PATH/env/lib/python3.7/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "$PATH/env/lib/python3.7/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/django/utils/decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "$PATH/env/lib/python3.7/site-packages/strawberry/django/views.py", line 153, in dispatch
operation_name=request_data.operation_name,
File "$PATH/env/lib/python3.7/site-packages/strawberry/schema/schema.py", line 183, in execute_sync
self.process_errors(result.errors, execution_context=execution_context)
File "$PATH/env/lib/python3.7/site-packages/strawberry/schema/base.py", line 79, in process_errors
StrawberryLogger.error(error, execution_context)
File "$PATH/env/lib/python3.7/site-packages/strawberry/utils/logging.py", line 32, in error
cls.logger.error(error, exc_info=error.original_error, **logger_kwargs)`

Hello,
Sorry for the late reply - the issue is only present because you are trying to print out the whole info object, which contains the response object as well (info.context.response). The response class's __repr__ method prints out the class name, stats code and content_type and since the status code has not been set just yet (is None), the %string formatting fails and throws this exception.
To access the authenticated user object, use info.context.request.user and for debugging purposes print out only info.context.request although I am not sure how much information you will get from that.

Hi,
Thank you for the response, I can understand the delay due to the holiday season. Happy New Year.
Let me try the methods you mentioned and close it if it resolves my issue.
Thanks,
Pradeep

Hi,
Forgot to close this issue. The solution you mentioned works.
Thanks.


Attributes on IEnumValue

Hi,
Would it be possible to add an Attributes property to IEnumValue?

Sure, it will be available in version 0.0.3 which should be released before the end of this week.


A way to reference closed issues or issues not assigned to the user

For most of my personal projects, the workflow I follow is merging several PRs/issues and then listing them in the changelog in a followup commit, e.g. https://github.com/connor4312/cockatiel/commit/7b7c100e950e320d85ce285afdb2a562949bce8f. However, I won't be able complete them, since they're closed (and if I have other contributors who have issues assigned to them that I'm mentioning in the changelog, I can't complete those either). Maybe a command for "Insert Issue Reference" with the capability to search through all issues would be useful, or an option to change how filtering works in completions by default.
Edit: also, a similar thing for users in the same scenario would be nice, if Github exposes an API for that 🙂

For the issues, we can definitely do this. What would be more useful for you: some setting that changes the the suggestion list to include closed issues, or the suggestion list switching to show only closed issues when you type "closed" after triggering the suggest? Or, as you suggest a command.
Users are harder. Currently, the user list comes from the repository. Where do the users you want to show come from?

or the suggestion list switching to show only closed issues when you type "closed" after triggering the suggest

I think this would be a good approach :)

Users are harder. Currently, the user list comes from the repository. Where do the users you want to show come from?

Maybe the union of collaborators + contributors?

Most broad option might be mentionableUsers in https://developer.github.com/v4/object/repository/
But not sure if it is frequent practice to mention issue authors, commenters, reviews in code.

FYI, you can now customize the query that is used in the issues view and the issues suggestions. Check out the githubIssues.customQuery setting.

Closing since customizing the query will solve this.


Not following links when looking at child outputs.

This is an attempt to solve issue 413.

Note: I'm not at all confident this approach is correct. https://github.com/snakemake/snakemake/pull/447 might be a better solution.


BottomNavBar pattern question

I have implemented the bottom navbar pattern as outlined in the tutorial, and it is working great. I would like to trigger navigation to one of the navbar items after another action is performed - is there a pattern for this? How do I inform the underlying View class which handles rendering each of the navbar item views to change indexes? Thank you in advance, and sorry if I missed this in the tutorial/documentation.

Can you please provide more information regarding this like where and how you are trying to trigger the navigation?

Basically I just want to trigger "navigation" via code as opposed to tapping one of the bottom navigation buttons. So, similarly to how the NavigationService is used, but instead change which bottom navigation button is active.

So for example, this is taken from the tutorial:
class HomeView extends StatelessWidget {
  const HomeView({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ViewModelBuilder<HomeViewModel>.reactive(
      builder: (context, model, child) => Scaffold(
        body: getViewForIndex(model.currentIndex),
        bottomNavigationBar: BottomNavigationBar(
          ...
        ),
      ),
      viewModelBuilder: () => HomeViewModel(),
    );
  }

  Widget getViewForIndex(int index) {
    switch (index) {
      case 0:
        return PostsView();
      case 1:
        return TodoView();
      default:
        return PostsView();
    }
  }
}

Let's say the current nav index is 0, so PostsView() is being rendered. So as an example, I want to programmatically change the bottom nav index to 1 and show the TodoView()

Ok, never mind, I feel dumb now. I could just pass a method to PostsView and TodoView that can be used for changing that index. If there is a better pattern though, I would appreciate feedback. It would be nice to have that method more widely available without having to keep passing it down the chain

You can call setIndex from anywhere in the ViewModel, and override it to call some functions when the setIndex is triggered. Additionally if you want to navigate or change the index based on some reaction from a service then you can use a stream to listen to it and update the index accordingly.