text:
Store and Access Logfile Data

We need a way capture the stdin/out/err from runs, and store it in either local logfile, or to S3 compatible object store. Later on this will be used to show this data to users through the UI. For now, we just need to store and organize it by the id if a run in our db/datetime

@samrose would we want to pull out the stdin/out/err and store it separately from the rest of the run data structure, or keep it nested inside of it?
Currently the data structure of a run looks something like the following, with the command output captured inside of each %Step{} (of course pipelines should be a graph and not a list – this uses the old code):
iex(1)> Mix.Tasks.Ei.run config: "ei.json"

 ...
{:ok,
 %ExIntegrate.Core.Run{
   active_pipelines: [],
   pipelines: [
     %ExIntegrate.Core.Pipeline{
       completed_steps: [
         %ExIntegrate.Core.Step{
           args: ["compile"],
           command: "mix",
           err: "warning: variable \"config\" is unused (if the variable is not meant to be used, prefix it with an underscore)\n  lib/ex_integrate/pipeline_runner.ex:64: ExIntegrate.Boundary.PipelineRunner.handle_info/2\n\nwarning: variable \"config\" is unused (if the variable is not meant to be used, prefix it with an underscore)\n  lib/ex_integrate/pipeline_runner.ex:70: ExIntegrate.Boundary.PipelineRunner.handle_info/2\n\nwarning: ExIntegrate.Boundary.PipelineRunner.run_pipeline/1 is deprecated. It runs pipelines using an old, naive, sequential implementation. Use Elixir.ExIntegrate.Boundary.PipelineRunner.start_link/1 instead for the recommended concurrent implementation.\n\n  lib/ex_integrate.ex:43: ExIntegrate.run_pipelines/1\n\n",
           name: "compile",
           out: "Compiling 12 files (.ex)\nGenerated ex_integrate app\n",
           status_code: 0
         },
         %ExIntegrate.Core.Step{
           args: ["clean"],
           command: "mix",
           err: "",
           name: "clean",
           out: "",
           status_code: 0
         },
         %ExIntegrate.Core.Step{
           args: ["deps.get"],
           command: "mix",
           err: "",
           name: "get deps",
           out: "Resolving Hex dependencies...\nDependency resolution completed:\nUnchanged:\n  bunt 0.2.0\n  credo 1.6.1\n  file_system 0.2.10\n  jason 1.2.2\n  libgraph 0.13.3\n  rambo 0.3.4\nAll dependencies are up to date\n",
           status_code: 0
         }
       ],
       failed?: false,
       name: "exintegrate_build",
       steps: [
         %ExIntegrate.Core.Step{
           args: ["deps.get"],
           command: "mix",
           err: nil,
           name: "get deps",
           out: nil,
           status_code: nil
         },
         %ExIntegrate.Core.Step{
           args: ["clean"],
           command: "mix",
           err: nil,
           name: "clean",
           out: nil,
           status_code: nil
         },
         %ExIntegrate.Core.Step{
           args: ["compile"],
           command: "mix",
           err: nil,
           name: "compile",
           out: nil,
           status_code: nil
         }
       ]
     },
     %ExIntegrate.Core.Pipeline{
       completed_steps: [
         %ExIntegrate.Core.Step{
           args: ["test"],
           command: "mix",
           err: "warning: variable \"config\" is unused (if the variable is not meant to be used, prefix it with an underscore)\n  lib/ex_integrate/pipeline_runner.ex:64: ExIntegrate.Boundary.PipelineRunner.handle_info/2\n\nwarning: variable \"config\" is unused (if the variable is not meant to be used, prefix it with an underscore)\n  lib/ex_integrate/pipeline_runner.ex:70: ExIntegrate.Boundary.PipelineRunner.handle_info/2\n\nwarning: ExIntegrate.Boundary.PipelineRunner.run_pipeline/1 is deprecated. It runs pipelines using an old, naive, sequential implementation. Use Elixir.ExIntegrate.Boundary.PipelineRunner.start_link/1 instead for the recommended concurrent implementation.\n\n  lib/ex_integrate.ex:43: ExIntegrate.run_pipelines/1\n\nwarning: variable \"server\" is unused (if the variable is not meant to be used, prefix it with an underscore)\n  test/ex_integrate/run_manager_test.exs:22: ExIntegrate.RunManagerTest.\"test works\"/1\n\nwarning: variable \"second_pipeline\" is unused (if the variable is not meant to be used, prefix it with an underscore)\n  test/ex_integrate/run_test.exs:109: ExIntegrate.RunTest.\"test return the next pipelines to launch\"/1\n\nwarning: variable \"second_pipeline\" is unused (there is a variable with the same name in the context, use the pin operator (^) to match on it or prefix this variable with underscore if it is not meant to be used)\n  test/ex_integrate/run_test.exs:111: ExIntegrate.RunTest.\"test return the next pipelines to launch\"/1\n\nwarning: unused alias Pipeline\n  test/ex_integrate_test.exs:6\n\nwarning: unused alias Server\n  test/ex_integrate_test.exs:5\n\nwarning: unused alias Step\n  test/ex_integrate_test.exs:8\n\ncat: nonexistant: No such file or directory\n",
           name: "compile",
           out: "Compiling 12 files (.ex)\nGenerated ex_integrate app\n......................step 1\nstep 2\n.step 3\nstep 1\nstep 2\nstep 3\n.*....\n\nFinished in 0.2 seconds (0.1s async, 0.06s sync)\n29 tests, 0 failures, 1 skipped\n\nRandomized with seed 954778\n",
           status_code: 0
         }
       ],
       failed?: false,
       name: "exintegrate_test",
       steps: [
         %ExIntegrate.Core.Step{
           args: ["test"],
           command: "mix",
           err: nil,
           name: "compile",
           out: nil,
           status_code: nil
         }
       ]
     }
   ]
 }}

This connects to what we discussed recently – that there are two potential sources of stdout/stderr output: Rambo's streamed output (side effect), and Rambo's function return.
Which one would be better to utilize for logging purposes?

authors: garrettmichaelgeorge samrose


text:
Dark tray icon

The current tray icon it's difficult to see in KDE:

Can we have the option to choose a dark tray icon?

Uuhm I see there are dark versions of the tray icons in the repo:
https://github.com/samschott/maestral-qt/blob/main/src/maestral_qt/resources/maestral_tray-info-dark.svg
How can I use them?

I have the same issues. I am on the current KDE Neon 5.27 with System Tray 1.0
I notice that within System Tray's Settings, the dark Maestral icon is used.

The tray icon color should be chosen automatically to contrast the background. However, the is a long-standing issue with Qt on KDE where grabbing pixels from the screen also gives "black" pixels, making such heuristics impossible.
To work around this, you can always install your own icons to use, for example by coping the dark icons from this repository to the appropriate location of your distro. This would typically be somewhere in ~/.local/share/icons/. Maestral will always check the system's icon theme first before resorting to using its own icons.

Here's a (somewhat unpleasant) workaround:
#!/usr/bin/env python
# iss837.py - force dark icons when auto-detection fails
# see: https://github.com/samschott/maestral/issues/837

import os
import shutil
from pathlib import Path
from importlib.resources import path, contents

icondest = Path("~/.local/share/icons/hicolor/scalable").expanduser()

if not icondest.exists():
    icondest.mkdir(parents=True, exist_ok=True)

os.chdir(icondest)

darksvgs = [x for x in contents('maestral_qt.resources')
    if x.endswith('-dark.svg')]

for svg in darksvgs:
    with path('maestral_qt.resources', svg) as s:
        shutil.copy(s, s.name)
        lightsvg = s.name.replace('-dark.', '-light.')

If you're using pipx or some other virtual environment system to run Maestral, activate the correct venv before running this script.
# get the script from above, put it in a file named `iss837.py`

# then, activate the correct venv so importlib can find `maestral_qt`
source ~/.local/pipx/venvs/maestral\[gui\]/bin/activate
python iss837.py

If you're using a dark theme, and you're getting dark icons instead of light ones, reverse the dark / light logic above before you run the script.
Hope that helps.

@ernstki Thank you very much!
It didn't work for me and those functions seem to be deprecated, but I took heavy inspiration from your script to write this one that switches tray system icon colors.
You may need to run it with sudo if maestral is installed globally:
#!/usr/bin/env python
# iss837.py - force dark icons when auto-detection fails
# see: https://github.com/samschott/maestral/issues/837

import shutil
import importlib.resources as impres
res = impres.files('maestral_qt.resources')

print("TO UPPERCASE")
for file in res.iterdir():
    if "maestral_tray" in file.name:
        new_file = file.parent / file.name.replace("-dark", "-DARK").replace("-light", "-LIGHT")
        print(f"{file} -> {new_file}")
        shutil.move(file, new_file)

print("SWITCH")
for file in res.iterdir():
    if "maestral_tray" in file.name:
        new_file = file.parent / file.name.replace("-DARK", "-light").replace("-LIGHT", "-dark")
        print(f"{file} -> {new_file}")
        shutil.move(file, new_file)

@raffaem I'll have to go through my shell history on that host, because it doesn't even look like that code would work—lightsvg's not even being used. Probably a copy-paste error on my part.

source: gharchive/issue

authors: ernstki leejoramo-d51 raffaem samschott

repo: samschott/maestral

license: MIT

license_type: permissive

license_source: github-api


text:
Mirage automatically sorts data: Bug or feature

I created a component that displays a list and if you specify 'sortBy="somefield"' it sorts the list. When sortBy is not specified I found that the list was still sorted. Looking at the response from mirage, the data is sorted from what is specified in the fixture file. I created a twiddle that shows the issue.
Is this a bug or feature? I would like to be able preform a unit test against my component to know if it is sorting properly or the original order of the list in the fixture.

We do sort by id by default before inserting records, since Mirage's database tries to replicate a true database as much as possible.
In your twiddle example you're using strings as ids. Typically these strings would be fields on the record, and the id would be an autoincrement integer. The strings look more like something like a slug, and if you were to change it you'd get the expected unsorted behavior. Does that solve your problem?

I know this is a super late reply and this question is old, sorry about that. I'll go ahead and close this for now, but please drop a message here if you're still stuck and we can work through it!

Thanks for the reply. I haven't worked on this pet project in a while. Since I wanted something more descriptive in the URL, and an auto incrementing int and a unique slug would be redundant, I just decided to omit the int and use the slug as the id.
It was more of a question of behavior and if it was expected, which it sounds like it is. I can do something in the unittest to test sort behavior now that I know.
Is there any downside to using the slug as the id instead of an int in Ember.js?

Understood + you're welcome :)
There's no downside from Ember's perspective, but a traditional server like Rails would recommend using auto-incremening integers as your ID fields, and using a separate field for slugs. Few reasons:

slugs can change, but database ids never should change
what if you delete my-slug but then want to re-insert it? many database systems prevent ever inserting records with ids that have already been used

In general a slug is different from an id (even if it happens to be a unique field), and over time the consensus has been to let databases use completely meaningless auto-incrementing integers for the id field.

Makes sense. Thanks for taking the time to answer my questions.

authors: rldleblanc samselikoff

repo: samselikoff/ember-cli-mirage

license: mit

license_source: bigquery


text:
used ng-bind instead of string interpolation.

Hi there,
First let me tell you that your code is extremely nice and well written.  Many thanks for this package.
Second, this pull request is to remove string interpolation from the source code and use ng-bind property instead.  This feature is important for me because I have defined and alternative string interpolation delimiters using the interpolateProvider service https://docs.angularjs.org/api/ng/provider/$interpolateProvider .
As you can expect, I fixed the unit tests an they all compiles.
cheers!
didier amyot

@didiercrunch Thanks!

@didiercrunch retagged it, should now be available through bower under v1.0.5

source: gharchive/pull-request

authors: didiercrunch samu

repo: samu/angular-table


text:
iOS: Mac Catalyst edition

Now that iOS 13 and macOS Catalina introduces the ability to build iOS apps for macOS, via Catalyst, there may be customer demand for a Mac edition of NewsBlur.
I've turned on the checkbox to build under Catalyst in a local branch, as an experiment, but there are a number of issues preventing successful building of a Mac app:

The most significant is the reliance on UIWebView. That is not supported in Catalyst, requiring using WKWebView instead. That isn't a simple transition, though: the web view is used extensively in NewsBlur, with JavaScript interactions and such, which would require many changes. It should be feasible, though. And may have to be done in due course even for the iOS app, since UIWebView has been discouraged since iOS 8, and is now formally deprecated as of iOS 13, in addition to being unavailable for Catalyst.

There's an error related to using the AddressBook framework, but that doesn't seem to be used, so can be removed.

There are many deprecation warnings, but those shouldn't be too hard to fix (and again will need to be addressed in due course).

Beyond those, of course, the app would need many changes to work well as a Mac app, including adding a menubar, probably some layout changes, and other UI tweaks.
But I think it could a a popular option for many people. Something to consider. Let me know if you want me to explore further.

Oh I remember attempting to transition to WKWebView a long time ago and it was not fun. I ultimately abandoned that branch.
That said, I would love to see this. NewsBlur was originally developed to replace NNW, a Mac app.

NetNewsWire has a new lease on life now. But I'm sure Brent would welcome other Mac newsreaders.
Yeah, transitioning to WKWebView will be a fair bit of work, but I'm confident that it is feasible, useful for Catalyst, and ultimately probably required for a future iOS version.
Okay, I will begin work on that in the next month or two, depending on other priorities that come up in the meantime.

A partial list of issues I've noticed, that I'll work on in the coming months, as time allows:

The story web view isn’t rendering the CSS correctly.
The font size is a bit small; might want to embiggen everything a few points.
When I first resized the window, a white box appeared.  Gone after relaunch, but should fix.
Probably will want to add three-pane support; useful for iOS too (see issue #817).
Should make the sidebar wider.
Should allow the user to resize the split panes, either using a proper split view, or (more likely) adding custom support for dragging the dividers.
Should show model views (e.g. Organize Sites) as separate windows.
Need to redo the preferences into a more Mac-like window, with popups instead of push items, etc.
Add more menu commands for appropriate functions.
A bunch of deprecation warnings that may or may not need to be fixed (lots of them, but most the same).
Add a circular app icon.

On the three-pane, I would love to rethink how NewsBlur iOS app has the panes. Today it's not great, but it works. I would be happy to move to something a bit more like sliding doors (ala Reeder), although that would make the dashboard river harder to show.

Work on the three pane option (and much more) is underway; see #817 for more info.

Looking good! Stories aren't tappable right now, but using the keyboard shortcut fixed that. Also, the login screen needs adjustment (ugh, such an old view too).

For Catalyst, let's reintroduce story content previews, story date, and author, as well as larger fonts.

I take that back, I prefer the extra story titles. But that's for the widget (#1334).
Let's widen the story titles a bit. Looks like they widen on their own at ~2000px.

Also, let's add a max-width to images of 1200px or something.

The Catalyst branch and Mac app are not ready for release yet. This is on hold until more required changes are done.

Should I still be merging in catalyst into testflight?

No, merge Dejal to TestFlight.

I've resumed work on the macOS edition of NewsBlur, in the Catalyst branch. The NewsBlur Alpha app for macOS is available via internal-only TestFlight.
There's still a bunch of refinements to do (so don't bother reporting issues yet), but it's in a usable shape already:

It's really great! What happened to the widget? I want to see it in my widget dashboard on macos.

As I recall, the widget isn't included in the Alpha build, for some technical reason I forget right now (maybe related to the bundle identifier or something). I'll take another look at that when next working on it.

More progress, with the user profile in the window body like on web, and work on menus. I spent a fair bit of time struggling to get the navigation bars to behave; they appear to be implemented outside the scope of the app with Catalyst, using separate windows for each button. And clicking on one disabled the menus. A bit of a mess. But I've found a solution, using Mac-native toolbars, and have started implementing that. I'll finish that next time.

I think the app is almost ready for release now. Just a few issues left. You can begin to report issues or request tweaks now if you wish.

Are you sure you want me to report issues? There's some quality of life issues in the Grid view on Catalyst. I suggest taking a look at how that's transitioning between stories.
Also, the scroll is much slower than I would expect from a native app. Isn't there a faster scroll option for story titles and the story detail?

Yes, you're welcome to report issues. I'm aware of some, but you may have other priorities.
I'll take a look at the Grid view, and the scrolling performance, though it's basically using the same code as on iOS, with the Catalyst translation layer to work on macOS, so there may be some performance impact. Still, I might be able to do something. Any performance improvement would probably also benefit the iOS app.

I've addressed all known issues now, so unless you have some specific issues, I think it is ready for public TestFlight feedback. Let me know if you want me to produce a public TestFlight build (it's currently internal-only).

I've finished my polishing; I don't have anything more on my list to do on this. Ready for a public TestFlight? Rather than making the NB Alpha app TestFlight public, we could merge into the Dejal branch, and do a main app TestFlight from there. Let me know if you want me to prepare that.

Nicely done. I've got some show stoppers that we need to fix before putting out a public beta. And sorry about the delay, I've been deep on server maintenance and transition for the past month, which you might have noticed from the flurry of commits. But we're now on dedicated hardware and it's much faster!

Let's widen the folders and feed titles to match the width of the view they're in, reducing the side margins to 0

Interactively swiping with two fingers on the feed list shows this overlapping story detail behavior

https://github.com/samuelclay/NewsBlur/assets/44229/9dddc160-7129-4058-af5f-1233dc54aa2f

After 5 minutes or so, returning back to the app while a story is loaded and the story is entirely blank. Usually happens on the second story and not the first

Training also isn't styled yet

And when macOS went to dark mode (which should automatically switch the theme!), I got this:

Clicking on story titles in the widget doesn't open stories in the app

Notifications aren't showing up on macOS. Anything I need to do on the server to get this working?

Sharing a story gave a (null) name:

I've addressed some of those issues. The training one was a challenge; it appears that Catalyst doesn't support web views in sheets. So I took that as an opportunity to do something I've wanted to do for a while: make the trainer a native view. I rewrote it as a SwiftUI view.
Here's the feed trainer:

And the story trainer:

Notice in the Story Title section, instead of selecting text and choosing a menu item to train words, I implemented an innovative approach where you tap words to add them to a neutral trainer (which can be cleared to start again). Then tap it to toggle to like or dislike, at which point it is saved (and another phrase can be started if desired).
I hope you like this new & improved edition of the trainer.

This is looking nearly ready to go. One issue I found is that when I return to the app after 30 minutes, the image previews disappear.

I think the Mac app is ready for a public TestFlight. Do you have any further issues? I'll save my time in May for any more issues with it, pre-and/or-post release.
I've added an Xcode Cloud workflow to build the macOS TestFlight, and disabled the iOS one for now. So all we need to do is merge the Catalyst branch changes into the Dejal branch, and it'll run automatically. If you're ready, you can do the honors, or I can if you prefer.

Just merged catalyst into dejal. As soon as it's public, I'll tweet about it and maybe even blog about it to get folks involved in testing it.

Looks like the build failed due to missing the macOS scheme (probably a merge issue). Let me know if you want me to fix that for you.

I've fixed the build issues. The app is currently awaiting beta review, so should be live in TestFlight soon.

And now it has been approved for TestFlight, so you can publicize it when you're ready.

Looks like we've got some feedback:

Just getting started with it, but some basic Mac OS conventions are missing. Menu items are missing for basic commands (like next, open in browser). And since they are missing, key commands are not labeled, and not changeable. I also miss that there is no in app browser. A lot of feeds have broken story mode and reader mode to drive views, and so to read any of these, I need to open in a browser. So basically, to read every story, I need to open in browser. If so, then I might as well go use the web app, since I end up in Safari primarily.

Another user:

I've mentioned this in the context of the iPad app, but it's also true here - I would really like if it supported all of the keyboard shortcuts that work on the web. In particular, it would be great if I could refresh the current view by pressing "R" (or by scrolling-to-refresh at the top of the current feed/folder). Thanks for continuing to develop Newsblur rather than put it in maintenance mode. I am excited to have a Mac app, but until it has parity with the web I probably won't make much use of it.

A third user:

Can you please make the sidebar resizable? Also, it'd be nice to be able to customize the toolbar in the main content area.

Agreed with all of these points! Let's:

Make the sidebar resizeable
Use an in-app browser
Keyboard shortcuts (and show them on holding command, like on ipad)
More menu items so keyboard shortcuts can be manually added by the user

I'll see what I can do. Though showing keyboard commands when holding Cmd isn't a Mac paradigm, so we shouldn't do that; you see keyboard commands by looking in the menus.

Just installed the latest TF: on iPhone, going back to the feed list, the selected feed no longer deselects (it should fade out so you know where you've just been).

I wasn't able to set a notification using the catalyst app.

Here's how it works on iOS:

I'm working on fixes.
Speaking of notifications, I've just created #1867 (Mac-specific notifications).

Done all of the requests. TestFlight builds available.
Note that in addition to the keyboard shortcuts via the menus, the Mac app also supports the non-modified shortcuts of the iPad app, e.g. "j" to go to the next story, "o" to open in the browser, "u" to mark unread/read, etc.
Since macOS doesn't have an overlay to show such shortcuts, perhaps you could add a help page on the website, and I could make the NewsBlur Help menu item show that? Online help is common for Mac apps, and would be a good thing.

I'm starting to rely on the app more but I'm having a few issues:

The trainer does not work on individual stories, it freezes
Tapping on story titles in the widget doesn't load the correct story
Coming back to the app after 15 minutes and seeing a blank story detail

Done some fixes. I can't reproduce the widget not loading the correct story, but I did have a recent widget fix, so that might help. If not, please show your Widget Sites view with the selected feeds, so I can try to reproduce it.
Also, as noted elsewhere, I can't do a TestFlight until you update the Apple agreements.

Agreement has been agreed

Any more feedback on the Mac app? It'd be great to get this launched! I'll be available over the next week if any issues come up.

Huh, my fix on June 27 didn't solve it?

Nope, I'm still seeing it just as often.

I had the Mac app running in the background all day today, every hour or so bringing it to the foreground and changing feeds/stories, but every time it has shown the story on activating the app; no blank stories. I was able to reproduce the issue before my June 27 fix, but not since.
So I'll need you to re-check it, and hopefully provide more clues if it is still occurring.

Yeah I've noticed it went away so I'll chalk it up to running an older build. At this point I'll need to assembly screenshots and launch it on the mac app store, which I'll try to do in the next few days.
I just moved to SF so I'm without furniture for the next couple weeks, so I'll be limited in what I can achieve.

Yeah, likely using an older build. I'm glad it's resolved.
I'll have a new TestFlight in the next few days, so it'd make sense to wait for that.
Best of luck getting set up in SF!

As I was taking screenshots, I noticed the app doesn't switch from light to dark like the iOS app does.

I manually changed it but we should include a way to use the system theme. This probably goes for the iOS app as well, as a fifth theme color for "Auto"

Enable the Follow System Appearance option:

Can we add "Auto" to the segmented control? I find ymself wanting to override it but not wanting to go back into preferences. I'll make this a separate ticket.

Ok, the app was rejected for the following reasons:

Guideline 2.1 - Performance - App Completeness
We are unable to complete the review of your app because one or more of your in-app purchase products have not been submitted for review.
Next Steps
To resolve this issue, please be sure to take action and submit your in-app purchases and upload a new binary in App Store Connect so we can proceed with our review.
Resources
Learn more about how to offer in-app purchases in App Store Connect Developer Help.
Guideline 3.1.2 - Business - Payments - Subscriptions
3.1.2(c) Subscription Information Before asking a customer to subscribe, you should clearly describe what the user will get for the price. How many issues per month? How much cloud storage? What kind of access to your service? Ensure you clearly communicate the requirements described in Schedule 2 of the Apple Developer Program License Agreement.
Issue Description
The submission did not include all the required information for apps offering auto-renewable subscriptions. Apps offering auto-renewable subscriptions must include all of the following required information in the binary:

Title of auto-renewing subscription, which may be the same as the in-app purchase product name
Length of subscription
Price of subscription, and price per unit if appropriate
Functional links to the privacy policy and Terms of Use (EULA)

The app metadata must also include functional links to the privacy policy and Terms of Use (EULA).
Next Steps
Update the app's metadata to include the following required information:

A functional link to the Terms of Use (EULA). If you are using the standard Apple Terms of Use (EULA), include a link to the Terms of Use in the App Description. If you are using a custom EULA, add it in App Store Connect.

Resources
Review Schedule 2 of the Apple Developer Program License Agreement.
Guideline 4 - Design
We noticed an issue with your app's user interface that contributes to a lower-quality user experience than App Store users expect.
Specifically, we found that when the user closes the main application window there is no menu item to re-open it.
Next Steps
It would be appropriate for the app to implement a Window menu that lists the main window so it can be reopened, or provide similar functionality in another menu item.
Alternatively, if the application is a single-window app, it might be appropriate to save data and quit the app when the main window is closed.
Resources

To learn more about App Store design requirements, see App Review Guideline 4 - Design.
Learn more about designing for macOS in the Human Interface Guidelines.

Support

Reply to this message in your preferred language if you need assistance. If you need additional support, use the Contact Us module.
Consult with fellow developers and Apple engineers on the Apple Developer Forums.
Help improve the review process or identify a need for clarity in our policies by suggesting guideline changes.

So basically we need to support in app purchases and make it so the app can be re-opened on close. I agree with the re-open on close feature, I was missing that. As for the in app purchases, they won't let us punt on that.

The main window can not be closed. The Close menu item and window button are disabled. So you might need to ask for clarification if they didn't notice that, or were able to somehow close the window.

Can you make it so that the app can be closed and then re-opened? Upon re-opening, it refreshes the feed list and loads the all site stories.

I've just experimented with allowing closing the window and re-opening it. I don't think that is feasible for NewsBlur at this stage, as it doesn't really support multiple "scenes", i.e. opening another window. Adding that support would require major refactoring.
I'll next experiment with quitting the app when the window is closed. Catalyst doesn't make that easy, but it might be possible.
I previously thought that preventing closing would be better, to avoid accidentally closing (you can always quit and re-launch).

Is there an API for that, or a standalone web page that I can send the user to, to delete the account?

There's both, but let's use this webpage: https://www.newsblur.com/profile/delete_account

It isn't possible to add a button to the Settings window on macOS; it is managed by the Catalyst system using the Settings bundle. More concerning, Sequoia seems to have broken the Settings window; it doesn't appear anymore. I'm investigating.
So I'll have to add the delete account option elsewhere. Could be in the File menu below "Logout NewsBlur". Or could add it to the confirmation alert for logout — have "Cancel", "Logout", and "Delete Account" buttons. The latter would log out then show the delete account page. (Would be good to log out when deleting the account anyway.) What would you prefer?

I decided that the latter suggestion was best, so implemented that. And fixed the Settings issue with Sequoia. TestFlight build incoming....

I've been using the macOS app a ton and it's been a great experience. One change I'd like to see is to match the up-to-date experience from the web. We have a configurable dashboard on the web that has real-time updated "widgets". Could we make a new "Dashboard" top level folder, same as on the web, with the story titles in groups matching the web? I publish those lists on /reader/feeds/:
"dashboard_rivers": [
    {
        "river_id": "river:",
        "river_side": "left",
        "river_order": 0
    },
    {
        "river_id": "river:infrequent",
        "river_side": "left",
        "river_order": 1
    },
    {
        "river_id": "river:global",
        "river_side": "left",
        "river_order": 2
    }
],

They should show 5 stories in the standard story titles format, and they should reload every 5 minutes (add a random 1-5 minutes per request so they don't all refresh together at once, some people can have dozens of rivers). I'd like to see this on both iPad and macOS, so I can leave the screen open and watch the news come in.
Bonus points for left vs right lists. And extra bonus points for single column, double column, and two horizontal columns (left "column" on top row, right "column" on bottom row).

That's an intriguing idea. Though this really should be a new issue, since it's only tangentially related to the Mac app; as you say, it'd be beneficial on the iPad app too.
I've added #1899.

It's approved! I'll blog about this tomorrow or early next week. Congrats, it's a terrific release and I'm very hungry for #1899 because not only will that get its own blog post but it'll help the mac app become a more present part of people's day.

Yay! I'm sure lots of people will be thrilled by a native Mac edition of NewsBlur. Very exciting to get it out there.
I will be available next week for any urgent fixes (please add as new issues), or otherwise working on #1899.

authors: Dejal samuelclay

repo: samuelclay/NewsBlur


text:
Convert mt to dateframe

Created hail_dataframe() function

merged #3


text:
server libraries conflict

It's me again the forge pain in the butt lol.  I am trying to run forge 1.6.4 and forge 1.7.10 on the same server and the libraries directory is going to get over written.  maybe there needs to be sub directories for each server jar to make sure there is no overwriting of the previous "libraries" directory?

Makes sense, the original Pull request #43 for Forge support did specify library paths and added them to the start server command. It almost looks like it put the libraries in each world rather than alongside the server jar. I think that placing the server jar in it's own subdir may be a good way to solve this.

What exactly is the problem?  The libraries should have version tags on the file names, so conflicts should not happen as far as I can tell.  I just tried running three different versions simultaneously with no issue:
cd /opt/mscs/server/

wget http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.6.4-9.11.1.1345/forge-1.6.4-9.11.1.1345-installer.jar
wget http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-10.13.4.1451-1.7.10/forge-1.7.10-10.13.4.1451-1.7.10-installer.jar
wget http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8-11.14.3.1450/forge-1.8-11.14.3.1450-installer.jar

java -jar forge-1.6.4-9.11.1.1345-installer.jar --installServer
java -jar forge-1.7.10-10.13.4.1451-1.7.10-installer.jar --installServer
java -jar forge-1.8-11.14.3.1450-installer.jar --installServer

mscs create forge-1.6.4 25569
mscs create forge-1.7.10 25570
mscs create forge-1.8 25571

nano /opt/mscs/worlds/forge-1.7.10/eula.txt
nano /opt/mscs/worlds/forge-1.8/eula.txt

mscs start
mscs status

Here is a composite status report:
Minecraft Server Status:
  forge-1.6.4: running version 1.6.4 (1 of 20 users online).
    Players: sandain.
    Process ID: 10458.
  forge-1.7.10: running version 1.7.10 (1 of 20 users online).
    Players: sandain.
    Process ID: 12542.
  forge-1.8: running version 1.8 (1 of 20 users online).
    Players: sandain.
    Process ID: 17113.

I didn't notice that the library files had version number too. @sandain is right, this should not be a problem.

I am sorry, I didn't check that either.  I just assumed it would cause issues.  Thank you again!

authors: sandain tobyjoiner zanix

repo: sandain/MinecraftServerControlScript


text:
🛑 Return to Sander is down

In 63902f4, Return to Sander (https://returntosander.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Return to Sander is back up in 5efcadc after 1 hour, 8 minutes.

repo: sanderdatema/upptime


text:
Genesis Block creation

Hello,
Whenever I try to do the part 6 of step 1 ("Go to http://localhost:7876/test?requestTag=ADDONS click on "downloadJPLSnapshot" then upload your file "newGenesisAccounts.json"...") I get the following error message:
{"errorDescription":"Inceorrect "height"","errorCode":4}
Could you help on this?

Try to actualize the height or re sync the blockchain.

Hi,
It worked when I downloaded all the blockchain again.
Hugs

authors: BardoBravo HexaHash


text:
[Question] How to get latest crawl?

Is there a way that I can get the most recent version (a single version) of a full site crawl of a list of URLs?

This isn't supported by the current API, but adding an -l/--latest option seems like a good feature request. In the meantime, you might be interested in scrapy-wayback-machine. That project provides a Scrapy middleware that this project uses under the hood, and it offers a lot more flexibility in terms of customizing behavior.
I'll leave this open as a feature request.

authors: sangaline santoshbs

repo: sangaline/wayback-machine-scraper

license: ISC


text:
DPL-057 Allow editing of batch information [OKR]

User story
We need to be a bit careful about how we approach this one, as certain piplines are very unhappy if you try to edit completed steps. However there is no real reason for sequencing to be one of these. However well will need to ensure:

[ ] 'Editing' a descriptor should create a new set of descriptors
[ ] We must always use the latest set of descriptors (such as in flowcell messages)

We should also:

[ ] Expose historic data clearly where appropriate
[ ] Allow the addition of RT numbers to edited information

Neil S:
In the process of loading flowcells most details (events) are manually entered.
Some are for 'in team' tracking e.g. Operator, Pipette Carousel, PhiX lot
whilst others are required for downstream analysis e.g. phix barcode, loading concentration, workflow
Presently once the batch is released these events cannot be updated by the team and require the generation of an RT ticket to update the event(s). There is potential for downstream analysis to be delayed.
The number of RT tickets generated for this action is consistently the highest in any month than any other area we support.
Who are the primary contacts for this story
e.g. John S (don't include surnames in public repos)
Acceptance criteria
To be considered successful the solution must allow:

[ ] add a list of acceptance criteria here
[ ] ...

Dependencies
This story is blocked by the following dependencies:

#<issue_no.>
sanger/#<issue_no.>

References
This story has a non-blocking relationship with:

#<issue_no.>
sanger/#<issue_no.>

Additional context
Add any other context or screenshots about the feature request here.

PR with annotations of existing code:
https://github.com/sanger/sequencescape/pull/3242

Improve the batch summary page to better handle updated data:
Before

After

James  I can see pipette carousel in the view twice. Removing it from the top row would free up some space

Its recorded for different steps, they don't necessarily use the same carousel each time.

I think a nice addition to the UI you've posted would be for there to be a label somewhere saying what the things in the cards / tables are. Our expert users will know, but new users (and developers!) might not.
I think the cards are lanes, and each table is an event, or something? Can the word 'lane' and 'events' go somewhere?
Apologies for annoying not-related-to-your-task request :)

I did try a descriptive list approach, but it was a bit hard to control space, so tables were an attempt to keep things compact. I can prototype another version and see what Tris thinks.

Quickly prototyped a cards version. For some batches there will be more columns...

Batch with more steps

The same batch with a table view

Card deck at the request level

It completely falls over for 8 lane batched though, and still looks cluttered if grouped by 4.

Tris likes the first protoype, but agrees that it falls apart with more columns. I'll look at improving that approach. A few ideas:

Limit ourselves to just 2-3 cards per line, to avoid getting too compact
Put the field titles above their values, rather than besides them
Drop the font size (As Tris suggests)
Could also consider hiding ‘empty’ fields by default.

I'm probably going to avoid the 'masonry' style approach of tessellating the columns, as:

Support has been dropped from bootstrap 5
It can sometimes split a card over multiple columns
While pretty, I think it overall reduces clarity with respect to card order, and even card divisions.

Tris also suggested abbreviating some of the fields, but as they get pulled straight from the database, this isn't really viable without changing the historical data.

Tris was worried that hiding empty fields could make it unclear if a field was missed.

Got something that seems to work. Not quite as responsive as I'd like, due to limitations in bootstrap card groups. But that does seem to have been improved in bootstrap 5, so might be able to revisit it soom.

Question to Tris:

I’ve got a question about some existing functionality in the Sequencing pipelines, that I suspect is almost entirely unused.

Most pipeline steps can be in one of two modes:
Per item mode (Mostly for setting concentrations) where each request has its own boxes
Per batch mode where a single set of fields are shared for the entire batch (most other steps)
PhiX has its own behaviour, and I’m not really covering it here.
In both modes it is possible to de-select requests as the top of the page, and only apply the values you filled in to the rest of the requests within the batch. When you do this, you’ll be returned to the same page.
In the case of per-batch mode, the fields will be filled in with the values on the previous page. You then need to adjust the selected requests, update the details as required and click update again. Once all the requests have been updated in this way, you get taken to the next page.
This approach already feels clunky, and will be incredibly confusing if you wish to edit a request. As a result I’m proposing the following:
If you choose to only update some requests in the batch, the screen will flip to per-item mode for the remaining requests.
Per item mode will also be selected if you choose to edit a batch where the information is different for the various requests.
One slight issues this raises though, is whether we should still populate the empty fields with the previous contents:
Advantages: Less typing, especially if its only one field that differs.
Disadvantages: More error prone, as it isn’t immediately apparent which fields haven’t been filled yet.
Do you have a preference? Keeping them blank is marginally simpler from our perspective, although more from a risk-of-bugs perspective than actual time to implement.

Running with not-populate for now

authors: JamesGlover KatyTaylor neilsycamore

repo: sanger/sequencescape


text:
DPL-455 - As Developers we need to add tests to the sample script so that we can refactor it and get it ready for adding to the support actions

User story
As Developers we need to add tests to the sample script so that we can refactor it and get it ready for adding to the support actions
Who are the primary contacts for this story
Neil
Who is the nominated tester for UAT
e.g. John S (don't include surnames in public repos)
Acceptance criteria
To be considered successful the solution must allow:

[ ] An RSpec test file for the sample script
[ ] A defined set of inputs and outputs
[ ] Sufficient test coverage to ensure that we are confident to refactor it

Dependencies
This story is blocked by the following dependencies:

#<issue_no.>
sanger/#<issue_no.>

References
This story has a non-blocking relationship with:

#<issue_no.>
sanger/#<issue_no.>

Additional context
Add any other context or screenshots about the feature request here.

Link to the script https://github.com/sanger/sequencescape/blob/develop/script/support/sample_move.rb

Removed from the board and deprioritised.


text:
Y24-120	BUG: Taken Link error when creating sequencing batches

From time to time when creating a sequencing batch the Short Read team encounter an error warning
'Ancestor has already been taken, Link already exists between these points'

They are unable to proceed with the batch and it is not clear from the warning which of the pool tubes is the centre of the issue.
Team have to raise an issue and wait for a fix before proceeding causing delays in production.
Cause of issue
This only occurs in cases where pool tubes have more than one stock tube however it does not occur in every instance of this.
The expected behaviour is that a pool tube (descendant) should have a 1:1 relationship with it's ancestors i.e. there should only be one AssetLink entry for the descendant per ancestor.
When there is more than one AssetLink entry the error is generated.
To reproduce:
Finding duplicates
SELECT    ancestor_id , alw.name ancestor_name , alwpp.name purpose , descendant_id , dlw.name descendant_name , dlwpp.name purpose , count(*) no_of_records , group_concat(al.id) 'AssetLink ids' FROM asset_links al LEFT JOIN labware alw ON alw.id = al.ancestor_id LEFT JOIN labware dlw ON dlw.id = al.descendant_id LEFT JOIN plate_purposes alwpp ON alwpp.id = alw.plate_purpose_id LEFT JOIN plate_purposes dlwpp ON dlwpp.id = dlw.plate_purpose_id WHERE al.ancestor_id IS NOT NULL  AND al.descendant_id IS NOT NULL GROUP BY al.ancestor_id, al.descendant_id HAVING count(*) > 1 order by al.created_at ASC;
Y24-120_output.csv
SQPP32908 E1:H1 is an example of a pool tube that has to identical asset links.
Requesting additional sequencing (S4, read length 100) and scan to postmanpat
Batch this request with others.
Create batch
'Ancestor has already been taken, Link already exists between these points'
Resolving:
The above SQL shows 76 instances of duplicates from ~10 million records.
Perhaps look to stop creation of duplicates?

relates to https://github.com/sanger/sequencescape/issues/3356

Hypothesis:
The following transfers are creating AssetLinks asynchronously:
app/models/transfer/between_plate_and_tubes.rb
Transfer::BetweenPlateAndTubes
app/models/transfer/between_tubes_by_submission.rb
Transfer::BetweenTubesBySubmission
They both have a build_asset_links method that create a AssetLink::Job, which is a AssetLink::BuilderJob. The create method enqueues a delayed job.
app/jobs/asset_link/job.rb
app/jobs/asset_link/builder_job.rb
When multiple links are to be built quickly, there is a race condition between the jobs at edge creation.
Testing:

Find a way to simulate a race condition to reliably reproduce the bug.

Approaches:

Quick: Run the asset link creation synchronously; no background job. We need to measure the effects on the performance.

Hard: Find a way to do a create or get the link atomically. How do we know it is the link we are supposed to create?

SELECT
    ancestor_id,
    alw.name AS ancestor_name,
    alwpp.name AS purpose,
    descendant_id,
    dlw.name AS descendant_name,
    dlwpp.name AS purpose,
    COUNT(*) AS no_of_records,
    GROUP_CONCAT(al.id) AS 'AssetLink ids'
FROM
    asset_links al
LEFT JOIN
    labware alw ON alw.id = al.ancestor_id
LEFT JOIN
    labware dlw ON dlw.id = al.descendant_id
LEFT JOIN
    plate_purposes alwpp ON alwpp.id = alw.plate_purpose_id
LEFT JOIN
    plate_purposes dlwpp ON dlwpp.id = dlw.plate_purpose_id
WHERE
    al.ancestor_id IS NOT NULL
    AND al.descendant_id IS NOT NULL
GROUP BY
    al.ancestor_id,
    al.descendant_id
HAVING
    COUNT(*) > 1
ORDER BY
    al.created_at ASC;

Link already exists between these points
https://github.com/payrollhero/acts-as-dag/blob/0a0a824013013d5b54d5b62716c3e29f0fe8a536/lib/dag/validators.rb#L7

Existing DDL.

There are two separate indices on (descendant_id, direct) and (ancestor_id, direct) columns.
There is no unique together constraint on the parent-child link. I think this would correspond to the trio (ancestor_id, descendant_id, direct). I am trying to understand if the indices in the previous item were intended to establish this uniqueness but got it wrong.

Solution:

creating a unique-together index on ancestor_id and descendant id
handling race condition in find_link and has_duplicates unique validation
handling unique constraint violation

Deployment:

Deploy first update to run a rake task to remove existing duplicate records
Deploy second update to handle race conditions

Part-1 of this story is deployed. I have decided to do the release of Part-1 and Part-2 separately and develop a strategy for handling the duplications added in between:
part-1 includes a rake task which is manually executed to remove duplicates from asset_links table to get ready for unique index creation.
Time window here will be handled with a different procedure.
part-2 includes a migration to create a unique index and handling of race conditions.

Deployed Part-1 to both UAT and Training. The following shows the rake command on training and collecting the output file for inspection.

Output of the rake task from UAT and Training:
uat_deleted_asset_links.csv
training_deleted_asset_links.csv
Deleted 251 asset_links records from UAT.
Deleted 324 asset_links records from Training.

Part 1 was deployed to all environments and duplicate records were removed by executing the rake task. Part-2 will be merged to develop and then to environments, for testing and production.

Deployed to UAT and Training. Running integration suite against Training because UAT has breaking changes from another story, training is similar but better, and part-2 is close to production.

During deployment to training (DB is almost the same), the index creation (running the migration) part took about 20 minutes.

I have attached the csv file that contains the record which prevented the production deployment in first attempt. The file is the product of the rake task to remove the duplicates. The unique index creation proceeded without problems after removing the duplicate.
prod_part_2_deleted_asset_links.csv

authors: neilsycamore yoldas


text:
GPL-002 create sequencing run

Modified run create
Added create and destroy for run, chip and flowcell
Modified Messages.publish to accept multiple flowcells
Ensure resources are returned on update

@stevieing bizarre...I've merge this is but it seems in a wierd state and hasnt recognised it has been merged. Am I ok to close this PR?

repo: sanger/traction-service


text:
fixin Signup and UI🪲[Bug]:

the page is not scrollable and texts is overlapping

Hey @sanika391 please assign me this issue

I have done it just check it once. Best of luck. If you need any kind of
help do let me know.
On Mon, May 20, 2024, 8:09 PM Rajveer @.***> wrote:

Hey @sanika391 https://github.com/sanika391 please assign me this issue
—
Reply to this email directly, view it on GitHub
https://github.com/sanika391/SpoonShare/issues/27#issuecomment-2120597373,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A34TW23ENGRV4PGSKW7VNFLZDIDJVAVCNFSM6AAAAABHZVJKTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRQGU4TOMZXGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

@sanika391 is this issue still open , if yes can you assign it to me

@sanika391 I accidentally unassigned myself from the task,I apologize for any inconvenience caused by this mistake,Could you please reassign me to the task so that I can continue working on it?

Sure, no problem.
On Wed, May 22, 2024, 9:53 PM Akshay Komar @.***> wrote:

@sanika391 https://github.com/sanika391 I accidentally unassigned
myself from the task,I apologize for any inconvenience caused by this
mistake,Could you please reassign me to the task so that I can continue
working on it?
—
Reply to this email directly, view it on GitHub
https://github.com/sanika391/SpoonShare/issues/27#issuecomment-2125214908,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A34TW2YGR7B7YJ4O46LKLJLZDTA6ZAVCNFSM6AAAAABHZVJKTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVGIYTIOJQHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Yes, it is working.
On Tue, May 21, 2024 at 8:50 PM Akshay Komar @.***>
wrote:

@sanika391 https://github.com/sanika391 is this issue still open , if
yes can you assign it to me
—
Reply to this email directly, view it on GitHub
https://github.com/sanika391/SpoonShare/issues/27#issuecomment-2122876685,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A34TW2Z3A3ILPWPTJGAYHCTZDNQ4ZAVCNFSM6AAAAABHZVJKTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSHA3TMNRYGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

I noticed that the Create Button at the bottom is not fully visible under a UI; half of it is hidden.

I noticed that the Create Button at the bottom is not fully visible under a UI; half of it is hidden.

hii @sanika391
I can design the UI in an interactive manner, making it visually appealing.
please assign me the issue


text:
[Visual Editing] draftMode().isEnabled inside sanityFetch() breaks on build

If you find a security vulnerability, do NOT open an issue. Email security@sanity.io instead.
Describe the bug
The draftMode().isEnabled inside the sanityFetch() declaration causes npm run build (works on npm run dev) to fail with the following error:
Error: `draftMode` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context

To Reproduce
Expected behavior
Screenshots
Full error:
> next build

  ▲ Next.js 14.2.3
  - Environments: .env.local

   Creating an optimized production build ...
 ✓ Compiled successfully
 ✓ Linting and checking validity of types
   Collecting page data  ..Error: `draftMode` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context
    at getExpectedRequestStore (/next/node_modules/next/dist/client/components/request-async-storage.external.js:28:11)
    at p (/next/.next/server/chunks/615.js:1:1915)
    at i (/next/.next/server/chunks/483.js:19:861)
    at Object.f [as generateStaticParams] (/next/.next/server/app/[slug]/page.js:1:7012)
    at buildParams (/next/node_modules/next/dist/build/utils.js:1026:58)
    at buildParams (/next/node_modules/next/dist/build/utils.js:1020:28)
    at /next/node_modules/next/dist/build/utils.js:1043:39
    at AsyncLocalStorage.run (node:async_hooks:346:14)
    at Object.wrap (/next/node_modules/next/dist/server/async-storage/static-generation-async-storage-wrapper.js:49:24)
    at buildAppStaticPaths (/next/node_modules/next/dist/build/utils.js:981:85)

> Build error occurred
Error: Failed to collect page data for /[slug]
    at /next/node_modules/next/dist/build/utils.js:1268:15 {
  type: 'Error'
}

Which versions of Sanity are you using?
@sanity/cli (global)        3.38.0 (latest: 3.45.0)
@sanity/image-url            1.0.2 (up to date)
@sanity/preview-url-secret  1.6.17 (up to date)

What operating system are you using?
macOS Sonoma 14.5
Which versions of Node.js / npm are you running?
9.5.0
v18.15.0

Additional context
I have a similar setup found here.
Differences:

"next": "^14.2.3"
fetch.ts resides under /lib not /app
no import 'server-only
However, these did not make a difference in the error output.

Security issue?

The sanityFetch pattern isn't meant to be used inside generateStaticParams API as it's not needed in this context:

perspective should always be published.
stega should always be false.
there's no need to set fetch.next or fetch.cache options as it's used within the static build for ISR. Setting fetch.next.revalidate makes sense for React Server Components that behave differently depending on wether Draft Mode is enabled or not.

Instead we recommend using a typical client.fetch call inside generateStaticParams :)

This resolved it! TYSM 🙌

authors: mitchuman stipsan

repo: sanity-io/next-sanity


text:
Absolute URL support

Is your feature request related to a problem? Please describe.
The preview plugins (iframe, presentation etc) don't allow us to provide absolute URLs. This hinders our ability to provide a URL resolution mechanism when using multiple domains. This would allow us to use the preview mode with websites that might be spread across multiple domains or subdomains. Think about multi-tenant setups or more commonly next-intl with domains for different locales. A concrete example I have is a project with 24 locales spread across 16 domains, like:
- [da-DK] example.com/
    - [en-DK] example.com/en/
    - [en-US] example.com/en-US/
- [en-GB] example.co.uk/
- [fr-FR] example.co.fr/
- [nl-BE] example.be/
    - [fr-BE] example.be/fr/
.......

Feeding the presentation plugin an absolute preview URL (for example on another domain) isn't possible as it only sends the path to the draft mode API.
The draft mode API url is always hardcoded, so a single Studio instance isn't able to invoke multiple different draft APIs.

Describe the solution you'd like
The presentation plugin (or iframe plugin btw) shouldn't try to protect me from myself. If I tell it that the url is something, it needs to trust me and send that something in its raw form to the draft API. It is the draft API's responsibility to decide if this is a legit request or not.
The draft mode API url should be able to be decided on a document by document basis, allowing for us to invoke multiple different domains or subdomains and set cookies for them. We should be able to provide a draft mode URL resolver, that would receive a Sanity context and the document being queried. The reason for this is that afaik cookies are set per domain, when using multiple domains, so my studio might be at .com, while preview for this particular document might sit at .co.uk. In this case, the draft endpoint from .co.uk must be invoked, as it can set the cookie for that domain.
Describe alternatives you've considered
I'm currently looking at somehow manually using usePresentationNavigate which seems to allow any URL, in combination with ¿something? from @sanity/preview-url-secret that'd construct draft urls with an appropriate preview secret. That would be dirty, but would at least allow us this functionality in some way :/
Which versions of Sanity are you using?
@sanity/cli (global)                   3.36.4 (up to date)
@sanity/document-internationalization   2.1.0 (latest: 2.1.1)
@sanity/icons                          2.11.6 (latest: 2.11.7)
@sanity/image-url                       1.0.2 (up to date)
@sanity/presentation                   1.12.1 (latest: 1.12.3)
@sanity/ui                             2.0.14 (latest: 2.0.16)
@sanity/vision                         3.36.4 (up to date)
@sanity/webhook                         4.0.3 (up to date)
sanity                                 3.36.4 (up to date)

Which versions of Node.js / npm are you running?
10.2.4
v20.11.1

Additional context
I'd be interested in contributing to this, although I have no idea where to start, so perhaps some advice would be needed. For now, let's see if the repo is interested in this sort of contribution (or perhaps I've missed something and this is entirely possible?)

It is my understanding that this is where the override happens: https://github.com/sanity-io/visual-editing/blob/a77ccf2b7e918579809d6f9fd90c1915d3d83ea0/packages/preview-url-secret/src/definePreviewUrl.ts#L31 although I must admit, I don't fully understand this code.

I suggest that we change this, so that the origin logic is used only if the given URL is not a valid absolute url, which is btw easy to check for with:

function isValidUrl(urlString: string): boolean {
  try { return Boolean(new URL(urlString)) } catch (e) { return false }
}

I've already been doing this same logic within the draft enable endpoint like this:
    // We'd prefer the client to always send absolute URLs, but we also support relative by trusting the proxied host header or the current hostname.
    const redirectUrl = isValidUrl(redirectTo)
      ? new URL(redirectTo)
      : new URL(
          redirectTo,
          request.nextUrl.protocol + "//" + request.headers.get("Host") ??
            request.nextUrl.href,
        );

And this is where the draft enable URL is fetched from: https://github.com/sanity-io/visual-editing/blob/a77ccf2b7e918579809d6f9fd90c1915d3d83ea0/packages/preview-url-secret/src/definePreviewUrl.ts#L24

I suggest we simply add an escape hatch that would allow us to define a callback as part of configuration, as an alternative to providing a static string. That'd be enough and allow us to use whatever logic we see fit, including server actions, to decide what draft url should be invoked.

FYI, we have a partial alternative in the meantime, where we circumvent @sanity/preview-url-secret by composing it ourselves. I've explained it here: https://github.com/tinloof/sanity-kit/issues/17#issuecomment-2041452863
This isn't ideal, and while it solves productionUrl preview urls, it still means that we are unable to offer Sanity presentation or live editing to our clients :(

This is the perfect explanation of the issue, I just stumbled across.
The only "solution" in our case (Next.js) would be using the embedded Studio and the draft mode URL set with a env variable. But IMO this would not be a great UX opening multiple embedded studios to edit stuff on multiple domains.
Hopefully this gets some attention soon, as we would also love to offer visual editing to our clients. 🙏

Thanks for sharing @markomitranic 🙌  We'll fast track this and add the escape hatches you need 👍

@markomitranic a status update on what we intend to do, following our deep dive into this so far.
We'll do two feature releases.
1. Add previewMode.check API
In order to call previewMode.enable dynamically then we need a way to check if preview mode is enabled or not.
The MVP configuration looks like this:
presentationTool({
  previewUrl: {
    previewMode: {
      enable: '/api/draft',
      check: '/api/draft-check'
    }
  }
})

The response of /api/draft-check is expected to be:
GET /api/draft-check 200
{
  "version": 1,
  "enabled": boolean
}

A basic implementation of this API in App Router would be:
/* eslint-disable no-process-env */
import {draftMode} from 'next/headers'
import {NextResponse} from 'next/server'

export async function GET() {
  return NextResponse.json({
    version: 1,
    enabled: draftMode().isEnabled,
  })
}

We plan on shipping first class utilities for this in @sanity/preview-url-secret and next-sanity.
With the ability to check if the preview url secret handshake is needed we're able to do improve cold starts and long lived preview sessions where it's necessary to restart Next.js Draft Mode due to newer deployments that happened in the background.
If you don't specify previewMode.check, then previewMode.enable works like before:

Presentation Tool loads, and assembles the iframe URL based on the previewUrl configuration.
The iframe is set to load new URL(${previewUrl.previewMode.enable}?redirect=${previewUrl.preview}, previewUrl.origin), and the API handler is responsible for redirecting the iframe to the preview after setting necessary cookies and what not.
While this is happening the iframe is hidden and a loading spinner is shown, until we receive a postMessage from @sanity/visual-editing letting @sanity/presentation know everything is ready to respond to events.
Iframe fades in and overlays are shown.

If the connection to @sanity/visual-editing is lost then we don't have a way of knowing if that's because the URL of the iframe changed somewhere external, if it's because the app crashed, or because a navigation happened and next had a newer deployment in the background so the current draftMode cookie is no longer valid, and the app is back in production mode. All we know is that the connection is lost.
With previewMode.check we can change the flow:

Call await fetch(previewUrl.previewMode.check, previewUrl.origin).enabled == true.
If enabled is false, call await fetch(previewUrl.previewMode.enable, {method: 'POST', body: {secret}}).
If the enable request is successful, then load the iframe with src={new URL(previewUrl.preview, previewUrl.origin).toString()}.
Wait for a while for the postMessage from @sanity/visual-editing, if received then we're done.
If it takes too long for @sanity/visual-editing to connect, we'll call previewMode.check again and check if we lost the session, if it's reporting enabled: true then we know there's something else preventing the connection (misconfiguration or a crash).
If enabled: false we can retry the handshake automatically a couple of times before giving up and throwing an error that takes you to docs for how to setup preview mode correctly as well as troubleshooting it.

Step 5-6 will also happen should the postMessage connection to @sanity/visual-editing be lost later on in a long lived session.
Finally, while adding this we also want to let you customize the fetch method used for the handshake, allowing you to set custom headers and more:
presentationTool({
  previewUrl: {
    previewMode: {
      enable: '/api/draft',
      check: '/api/draft-check',
      defineFetch: context => (url: URL, init: RequestInit): Promise<Response>
    }
  }
})

2. Support absolute URLs/multiple origins for previews
The locations API, as well as how previewMode works, is built under the assumption that everything you're previewing will happen on a single origin/domain.
The URL bar validation operates under this assumption, so does the locations drawer.
In order to support use cases like locales tied to a specific domain or subdomain, or markets and regional segments, then it becomes necessary to build in support for it in each layer of the stack.
previewMode needs to know when you're moving between domains and which ones need to initiate a handshake, and we might need to expose a way to configure how the handshake is setup based on the origin:
presentationTool({
  previewUrl: {
    previewMode: origin => {
      switch(origin) {
        case 'https://next.vercel.app':
          return {enable: '/api/draft', check: '/api/draft/check'}
        case 'https://hydrogen.shop':
          return {enable: '/api/preview'}
        default:
          // Returning false signals that a handshake shouldn't be attempted, or isn't needed
          return false
      }
    }
  }
})

The locations API needs to support rendering absolute URLs in its drawer, allowing viewing a e.g. french translation of a document that lives on a different domain than the one currently in the preview iframe.
We'd also need an API for validating the URL, that is used when:

a URL is manually entered in the preview URL bar.
the document.referer state is read on initial load when there isn't a &preview search parameter in the URL.
the &preview search parameter is read from the URL.

Dear @stipsan thank you for this lengthy and sturdy plan of action! I am super happy to hear some movement on this, it will change the editor's experience quite a bit if we are able to do this!
I understand that your "RFC" needs to support more consumers than I can think of - live editing, preview links, iframe plugin etc, and many ways of using it - you mention being able to manually type stuff into the address bar for example, I never thought of that. So, I write this while fully appreciating that the issue is more complex than it seems to me, nor am I a library author, so not thinking that I deserve any sort of influence. Just my 2 cents.
We might be overthinking this. The proposed changes seem much more like a long-term course correction, than a simple and non-breaking addition to the API.
Instead of taking it in small steps, going from a string to a simple callback, we are talking about re-engineering how preview URLs work. I like the changes, but I don't think they are at all necessary to resolve the issue I've raised:
- don't see a real point of `check`. Sure, it will save 0.2s for editors when they are being redirected, but will introduce a bunch of complexity/state that the Sanity team now has to think about forever - Redirect-on-every request (UI or address) served us perfectly fine so far, I don't see why we'd trade that.

The only reason we'd have this is if you are clicking links within the iframe, and you click on a link that belongs to a different domain, where a new draftMode is needed. I firmly believe we should not accomodate for this. The only place where we should trigger draftMode are the UI, not the iframe. This is an edge case, that we don't have support for anyway. The primary use case of all 3 preview plugins is to preview a specific page that the user is editing. We shouldn't try to build a browser out of it. At the end of your proposal you like out some changes to the way Address bar is handled, but I am afraid I don't fully understand those either, why wouldn't it use exactly the same system as the rest of the app does - take the URL, find out if draftMode is needed by sending the origin of the url to previewMode function, don't use draftMode if not.

Looking at the switch statement in the second part, do I understand it correctly that it would send us the origin as seen on the resolved previewUrl? In that case it is fine, as long as we have an easy mechanism for supporting relative URLs by default.

Also worth mentioning that the draftMode.defineFetcher addition is added to solve different use cases, such as when you deal with Vercel deployments that have protection enabled, and require some form of bypass to be setup: https://github.com/sanity-io/next-sanity/issues/770#issuecomment-1828910958
It's also to allow similar security requirements where you may have to send certain headers or extra secrets to bypass strict firewalls.
It's mentioned here since it also allow you to customize requirements that may be necessary in the context of intl. For example you may have middleware setup that makes it necessary for the fetch to /api/draft to have the correct Accept-Language header to avoid it redirecting you to a different locale than what you're trying to navigate to.

Any plans / progress to support preview mode for multiple domains? 😄 We have the studio and our other applications spread across different subdomains, so presentation mode is pretty useless for us. This feature would be much appreciated. Keep up the great work that you guys do ⭐

Any plans / progress to support preview mode for multiple domains? 😄 We have the studio and our other applications spread across different subdomains, so presentation mode is pretty useless for us. This feature would be much appreciated. Keep up the great work that you guys do ⭐

I am using preview mode on multiple websites. It is not documented how to do it, and I wish that Sanity made this an easier thing to do. You basically have to hijack the sanity.config.ts / documnt.productionUrl to generate draft mode requests that are created whenever a user clicks on the preview button yourself.
import { createPreviewSecret } from "@sanity/preview-url-secret/create-secret";

export const previewUrl: DocumentPluginOptions["productionUrl"] = async (
  prev: string | undefined,
  context: ResolveProductionUrlContext,
): Promise<string | undefined> => {
  const { getClient, document, currentUser } = context;
  const client = getClient({ apiVersion: "2023-06-04" });

  const resolvedUrl = await resolver(); // <-- my own internal URL generation implementation here.
  if (!resolvedUrl) return prev;

  const { secret } = await createPreviewSecret(
    client,
    "@sanity/presentation",
    typeof window === "undefined" ? "" : location.href,
    currentUser?.id,
  );

  return constructDraftUrl(
    "/api/draft/enable/",
    secret,
    resolvedUrl.href,
    resolvedUrl.locale,
  ).toString();
};

function constructDraftUrl(
  draftEndpoint: string,
  secret: string,
  resolvedUrl = "/",
  targetLocale: Locale,
) {
  const domain =  findDomainByLocale(targetLocale); // <-- My own logic for finding the appropriate domain. In my case based on the targetLocale parameter, but of course you may pass your own props.

  const enablePreviewModeUrl = new URL(draftEndpoint, domain);
  enablePreviewModeUrl.searchParams.set("sanity-preview-secret", secret);
  enablePreviewModeUrl.searchParams.set(
    "sanity-preview-pathname",
    resolvedUrl ?? "/",
  );
  return enablePreviewModeUrl;
}

With this in place, your preview button will now send the user to the appropriate draft API on the appropriate domain, with the sanity-preview params and your URL. Works like a charm for our editors in production on 20 domains for a while now. Hope this helps @mjansrud (also @stipsan i guess would love to read this 😄  )

Hi @markomitranic
following is my sanity config  setup

export default defineConfig({
    ...
    plugins: [
        codeInput(),
        table(),
        structureTool({
            ...
        }),
        visionTool({
            ...
        }),
        presentationTool({
            previewUrl: {
                origin: url,
                previewMode: {
                    enable: '/api/draft/',
                },
            },
            resolve: {
                mainDocuments: defineDocuments([
                    {
                        route: `${prefix}/:slug`,
                        filter: `_type == $type && nameSlug.slug.current == $slug`,
                    },
                ]),
                locations: {
                    ...AbortController.
                }
            }
        }),
    ],
    document: {
        async productionUrl(prev: string | undefined, context: ResolveProductionUrlContext) {
            console.log("prev", prev);
            const { getClient, document, currentUser } = context;
            const client = getClient({ apiVersion: "2024-06-30" });
            console.log(document._id);
            let resolvedUrl;
            if (document._id === 'A') {
                resolvedUrl =  'http://localhost:3000/';
            } else {
                resolvedUrl = 'http://localhost:3001/';
            }

            console.log(location.href)

            const { secret } = await createPreviewSecret(
                client,
                "@sanity/presentation",
                typeof window === "undefined" ? "" : location.href,
                currentUser?.id,
            );

            const enablePreviewModeUrl = new URL('/api/draft/', resolvedUrl);
            enablePreviewModeUrl.searchParams.set("sanity-preview-secret", secret);
            enablePreviewModeUrl.searchParams.set(
                "sanity-preview-pathname",
                resolvedUrl ?? "/",
            );
            console.log("enablePreviewModeUrl", enablePreviewModeUrl.toString());
            return enablePreviewModeUrl.toString();
        },
        actions: (prev: DocumentActionComponent[], context: DocumentActionsContext) => {
            ...
        }
    },
    schema: {
        types: schemaTypes,
        templates(prev, context) {
            return [

            ];
        }
    },
});

In my case, we are using two distinct home page ids to render home page of two separate domains. but, presentation tool always ends up using origin value mentioned in previewUrl.origin.
Have I done something wrong in the above setup or have I misunderstood anything?
following the versions that we are using
"sanity": "^3.57.3",
"@sanity/presentation": "^1.16.2",
"@sanity/vision": "^3.49.0",
Thanks!

authors: markomitranic mjansrud mrr11k neilmalgaonkar stipsan

repo: sanity-io/visual-editing


text:
[GITHUB-6] Add TCP check template

This adds the TCP Check template as documented with http://docs.datadoghq.com/integrations/tcpcheck/. The template supports multiple instance stanzas. The required data structure looks like this;
datadog:
  integrations:
    tcp_check:
      endpoint: ["my.domain.com","your.domain.com"]
      name: ["TCP Check for my.domain.com","TCP Check for your.domain.com"]
      port: ["443","80"]

The templates renders an error if not all list variables have the same length.

Could we make the var structure more like this:
datadog:
  integrations:
    tcp_check:
      - endpoint: "my.domain.com"
        name: "TCP Check for my.domain.com"
        port: "443"
        timeout: 1
      - endpoint: "your.domain.com"
        name: "TCP Check for your.domain.com"
        port: "80"
        timeout: 2

Yes, that's actually clearer. I will refactor.

@lobsterdore I have changed the template to make it work with the suggested data structure. It's actually much better than the original proposal.

LGTM :+1:

How often this check will run?

I think we should have an example in the README as well, since this check is a bit more complex than the other ones.

As with the discussions we had, with commit https://github.com/sansible/datadog/pull/7/commits/4e782929f016b49ea0344ea15f4e8a5aca8a74df, the data structure
datadog:
  integrations:
    tcp_check:
      - endpoint: "my.domain.com"
        name: "TCP Check for my.domain.com"
        port: "443"
      - endpoint: "your.domain.com"
        name: "TCP Check for your.domain.com"
        port: "80"
        timeout: 2
        collect_response_time: "false"
        min_collection_interval: 60

results in
---

init_config:

instances:

  - name: TCP Check for my.domain.com
    host: my.domain.com
    port: 443
    timeout: 1
    collect_response_time: true
    skip_event: true

  - name: TCP Check for your.domain.com
    host: your.domain.com
    port: 80
    timeout: 2
    collect_response_time: false
    skip_event: true
    min_collection_interval: 60

I have updated the README to document a sample data structure for the TCP Check.

LGTM :+1:

authors: lobsterdore quater racer1680

repo: sansible/datadog


text:
fix(deploy_scenarios): update linux_system_roles to 1.82.0

command used to update: find . -type f -name "ansible_requirements.yml" -exec sed -i '' 's/1.33.0/1.82.0/' {} +
Closes #30

from 1.33.0 to 1.82.0 there aren't any breaking version release, I don't think is a breaking merge.


text:
Get your Use Case Buddy started

Tutorials: https://developers.sap.com/tutorials/build-use-case-buddy.html
hi
i cannot see images.
best
paulina

Images are now visible.

authors: jmmargo pbujnicka

repo: sap-tutorials/Tutorials


text:
Fix dependencies

fix path for github.com/urfave/cli
add go.mod / go.sum to able compile in go 1.17+

This issue has been closed due to over a year of inactivity. If this matter is still relevant, please feel free to reopen it by adding a comment.

authors: ArtieReus abtris

repo: sapcc/puma-exporter


text:
refactor: update to v2

⚠ This Pull Request requires https://github.com/sapphiredev/framework/pull/227 to be merged and released in npm in order to work.

@sapphire/plugin-api

:warning: BREAKING CHANGE: Increase @sapphire/framework requirement to v2.

@sapphire/plugin-i18next

Added i18next.StringMap to the exports.
Added i18next.TFunction to the exports.
Added i18next.TFunctionKeys to the exports.
Added i18next.TFunctionResult to the exports.
Added i18next.TOptions to the exports.
Changed InternationalizationHandler#init to not longer mutate options.
Changed InternationalizationHandler's constructor to not longer mutate options.
Expose i18next's full types for resolveKey.
:warning: BREAKING CHANGE: Changed InternationalizationHandler#options to not be optional.
:warning: BREAKING CHANGE: Increase @sapphire/framework requirement to v2.
:warning: BREAKING CHANGE: Increase discord.js requirement to v13.
:warning: BREAKING CHANGE: Removed I18nextClient#fetchLanguage in favor of InternationalizationHandler#fetchLanguage.
:warning: BREAKING CHANGE: Removed I18nextClient#i18n in favor of Context#i18n.
:warning: BREAKING CHANGE: Removed I18nextClient.
:warning: BREAKING CHANGE: Removed Message#editLocalized in favor of editLocalized(message, options).
:warning: BREAKING CHANGE: Removed Structure#fetchLanguage in favor of fetchLanguage(structure).
:warning: BREAKING CHANGE: Removed Structure#fetchT in favor of fetchT(structure).
:warning: BREAKING CHANGE: Removed Structure#resolveKey in favor of resolveKey(structure, keys, options).
:warning: BREAKING CHANGE: Removed Structure#sendLocalized in favor of sendLocalized(structure, options).
:warning: BREAKING CHANGE: Renamed I18nextClientOptions to InternationalizationClientOptions.
:warning: BREAKING CHANGE: Renamed I18nextHandler to InternationalizationHandler.
:warning: BREAKING CHANGE: Renamed InternationalizationHandler.fetchLocale to format.
:warning: BREAKING CHANGE: Renamed InternationalizationHandler.fetchT to getT.
:warning: BREAKING CHANGE: Require discord.js in /register.
:warning: BREAKING CHANGE: Simplified editLocalized's overloads.
:warning: BREAKING CHANGE: Simplified sendLocalized's overloads.

@sapphire/plugin-logger

:warning: BREAKING CHANGE: Increase @sapphire/framework requirement to v2.

@sapphire/plugin-subcommands

:warning: BREAKING CHANGE: Increase @sapphire/framework requirement to v2.

@sapphiredev pack

authors: Favna kyranet

repo: sapphiredev/plugins


text:
[BUG] Setting HideThumbNail = false shows a play icon inside a white box before playing the video in Android

Describe the bug
A white play icon inside a white container shown when live video is loading in Android devices when hideThumbnail flag is set to true. We have an empty black screen in the ios side as expected.
To Reproduce
Steps to reproduce the behavior:
Open any video with "hideThumbnail = true" flag in the sample app.
Expected behavior
nothing should be shown
Screenshots

Technical Details:

Device: Android Emulator Pixel Api and One Plus
OS: Android
Version 29

Additional context

It's from the iFrame Player API, so I guess nothing can be done for now.

authors: dreampowder sarbagyastha


text:
yaml installer

see #18 ... this way folks can just run the docker image in #16  as a pod

Added support for this including a sample example yaml file.


text:
ReflectedMethods#readStringValues does not work...

Hi,
I need to use the readStringValues function but some used info parameters are wrong.

Your code (line 78-84):

		// info[0] = number of values which can be read
		// info[1] = ??
		// info[2] = number of all value entries in given key
		// info[3] = maximum string length from all the values

		int count = info[0];
		int maxlen = info[3];

My changed code (line 78-85 - see my fork):

		// info[0] = number of keys which can be read
		// info[1] = ??
		// info[2] = number of all value entries in given key
		// info[3] = maximum string length from all the key names
		// info[4] = maximum string length from all the values

		int count = info[2];
		int maxlen = info[4];

I would like to correct it but I am not an authorized commiter...
Can you report the change (or give me commiter right).
Best regards,
ToBeKege

Hello @ToBeKedge,
Thank you for the fix. I already merged it directly from your fork:

Just FYI, you don't need to have commiter rights to push into other repositories. Actually I have no idea how to set commiter right, I think I would have to move this repo under organization entity. However, to send your commit into original repo without having commiter right, you can use "Pull Request" button to pull commits from your fork into the original repo:

That's all :) Your pull request will appear in "Pull Requests" in original repo and owner may can click "Merge" to submit your commit into the code.
You don;t have to create Pull Request because I already merged your commit directly from your fork.
Thank you!

If you like, you can test pull request functionality and put your name into the authors list at the top of the file you modified :)
https://github.com/sarxos/win-registry/blob/2bae83631f50aef309bdda9c5c358410fcf43d5d/src/main/java/com/github/sarxos/winreg/internal/ReflectedMethods.java

@ToBeKedge, I take a look into the code and I'm wondering if this change will not cause crash when you try reading inaccessible value. Please take a look at this commit I did in 2014: https://github.com/sarxos/win-registry/commit/f59313e0c571503c8fb497bab36134f864dbfc91
Previously count was read from info[2] and I modified it to read from info[0]. Your commit revert it back to info[2] so maybe we should consider some regression test for this patchset?

authors: ToBeKedge sarxos

repo: sarxos/win-registry


text:
node-sass download

I have installed latest node '6.0.0' and when i try to install this i see Cannot download "https://github.com/sass/node-sass/releases/download/v3.6.0/win32-x64-48_binding.node":  and in the node-sass there is no -48 version.

This issue is being tracked in binaries repo: https://github.com/sass/node-sass-binaries/issues/128.
In the meanwhile, if you have Visual Studio or VC Build Tools 2015 installed, you can try:
:: set environment variable to force compile the binary locally
SET SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=1

:: then install the package
npm install

i am using terminal from git

node-sass v3.7.0 supports node.js v6
npm i node-sass@3.7.0

repo: sass/node-sass-middleware


text:
Cannot download "v3.2.0/freebsd-x64-0x000C_binding.node" by npm install

I Can't download "https://github.com/sass/node-sass/releases/download/v3.2.0/freebsd-x64-0x000C_binding.node" by npm install.
> node-sass@3.2.0 install /.amd_mnt/account/users/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.2.0/freebsd-x64-0x000C_binding.node": HTTP error 404

> node-sass@3.2.0 postinstall /.amd_mnt/account/users/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js

Building: /.amd_mnt/account/users/bin/node node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gmake: Entering directory '/.amd_mnt/account/users/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/build'
  CXX(target) Release/obj.target/libsass/src/libsass/ast.o
cc1plus: error: unrecognized command line option "-std=c++0x"
src/libsass.target.mk:127: recipe for target 'Release/obj.target/libsass/src/libsass/ast.o' failed
gmake: *** [Release/obj.target/libsass/src/libsass/ast.o] Error 1
gmake: Leaving directory '/.amd_mnt/account/users/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2

This is really strange, where did you get your node from?

Just general install it from node server.
node version v0.11.1
npm version v2.13.0
Can You check the URL "https://github.com/sass/node-sass/releases/download/v3.2.0/freebsd-x64-0x000C_binding.node" still work?

Node 0.11 is not supported, you need to use node 0.12 or 0.10

I use Node 0.10.35, NPM 2.2.0 and got the same error...
 node-sass@3.2.0 install /.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/vendor/freebsd-x64-11/binding.node

> caniuse-api@1.3.2 postinstall /.amd_mnt/projects/faq/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/caniuse-api
> node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node dist/generate-features.js')"

> node-sass@3.2.0 postinstall /.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js

` /.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/vendor/freebsd-x64-11/binding.node ` exists.
 testing binary.
Problem with the binary.
Manual build incoming.
Building: /usr/local/bin/node node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gmake: Entering directory '/.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/build'
  CXX(target) Release/obj.target/libsass/src/libsass/ast.o
cc1plus: error: unrecognized command line option "-std=c++0x"
src/libsass.target.mk:128: recipe for target 'Release/obj.target/libsass/src/libsass/ast.o' failed
gmake: *** [Release/obj.target/libsass/src/libsass/ast.o] Error 1
gmake: Leaving directory '/.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/lib/build.js:271:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System FreeBSD 9.3-RELEASE
gyp ERR! command "/usr/local/bin/node" "/.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /.amd_mnt/projects/faq/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v0.10.35
gyp ERR! pangyp -v v2.2.1
gyp ERR! not ok
Build failed

Now that's something different.
You are using FreeBSD 9.3-RELEASE and our binaries are built for FreeBSD 10.x or later, and they use clang C++ libraries.
It is still possible to compile the binding and libsass yourself, it's just some work:

you need to install lang/gcc48 or later from ports (the compiler you have in base is not enough)
you can start the build process with env CC=gcc48 CXX=g++48 LINK=gcc48 LINKXX=g++48 npm install node-sass and it should build the binary.
if you get complaints about undefined symbols trying to run node-sass, you need to compile node with the gcc48 compiler.

repo: sass/node-sass


text:
npm install node-sass fails

node-sass@3.13.1 install C:\omitted
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":
HTTP error 404 Not Found
Looking into it, 3.13.1 only has release files up to /win32-x64-51_binding.node
https://github.com/sass/node-sass/releases/tag/v3.13.1

when i used -g it worked properly and got the latest version...
node-sass@4.5.3 install C:\omitted
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-57_binding.node
Download complete..] - :

Correct, Node 8 is only supported with 4.5.3

if node 8 is only supported with 4.5.3 then why would running 'nom install node-sass' request version 3.13.1 ?

You can run npm ls node-sass to see which dependency is pulling in the
older node-sass.
On 14 Jun. 2017 2:42 am, "skaraman" notifications@github.com wrote:

if node 8 is only supported with 4.5.3 then why would running 'nom install
node-sass' request version 3.13.1 ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2014#issuecomment-308176990,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWPD7JjFwBiTwD19AzONnV5twrh88ks5sDrvzgaJpZM4N31Pn
.

Run npm install node-sass@latest -g
Modify package.json from your project to new version of node-sass
Run npm install

It works for me.

authors: nschonni renolmachado skaraman xzyfer


text:
Solve your slow installation problem

Solve your slow installation problem

You might need to move to postcss instead

We cache the bindings on install. If you're hitting slow installs, it might be be from running on CI or Docker that aren't taking advantage of those. Closing as there doesn't seem anything actionable here

authors: 68wangxianming jfroffice nschonni


text:
Options: Inherit LibSass defaults

As per this discussion which transpired here: https://github.com/sass/node-sass/issues/673, we need to inherit all options defaults from LibSass (except for paths). The key is to have conditional setting of those options in binding.cpp.
//cc @sindresorhus

We have two options, add ifs on setting every option, set all options for all cases and set default (the current behavior). I think the current behavior is better, i.e. not uglifying C++ code.
@xzyfer, thoughts?

The current behavior is less noisy at C++ side, so closing this one..


text:
Move lodash.mergewith from dependencies to dev-dependencies.

It's only used in a test.
Note: This is true in 4.8.3, if you plan on making another 4.x release I could rebase this branch against master instead.

💓

:+1: might be worth cherry-picking this to master if we do one last 4.x release

authors: nschonni realityking xzyfer


text:
False positives for no-duplicate-properties rule

Using sass-lint 1.10.0 (via gulp-sass-lint 1.3.0), both of the follow code blocks report a violation from the no-duplicate-properties rule where I've indicated with a comment.  Both of these lines are variable declarations and not even properties, so I have no idea why it's reporting these at all!
Luckily this release now includes rule disable comments, so I'm able to ignore these for now until this issue is resolved.
@mixin make-dashboard-grid-columns-float($columns, $class) {
    $list: '';

    @for $i from 1 to $columns {
        $list: '.col-#{$class}-#{$i}, #{$list}';
    }

    $i: $columns;
    $list: '#{$list}, .col-#{$class}-#{$i}';  // <--- lint error reported on this line

    #{$list} {
        // Inner gutter via padding
        padding-left: ($dashboard-grid-gutter / 2);
        padding-right: ($dashboard-grid-gutter / 2);
    }
}

.alert-tab {
    $subnav-color-alert-base: #921D1D;
    $subnav-color-alert-color: #FFECEC;
    $subnav-color-alert-bg: #B86B6B;
    $subnav-color-alert-bg-hover: #CD9898;
    $subnav-color-alert-bg-hover-gradient-secondary: #B36161;
    $subnav-color-alert-color-hover: #FFF;
    $subnav-color-alert-bg-hover: #FFF;  // <-- lint error reported on this line

    @include gradient-vertical($subnav-color-alert-bg, $subnav-color-alert-base, 30%, 85%);
    color: $subnav-color-alert-color;
    font-weight: bold;
    background-color: $subnav-color-alert-bg;

    &:hover {
        @include gradient-vertical($subnav-color-alert-bg-hover, $subnav-color-alert-bg-hover-gradient-secondary, 30%, 85%);
        color: $subnav-color-alert-color-hover;
        background-color: $subnav-color-alert-bg-hover;
    }

    &.current {
        color: $subnav-color-alert-base;

        &:hover {
            background: $subnav-color-alert-bg-hover; //force this BG color back on to replace the gradient
        }
    }
}

Hi @chrismbarr Yeah, I actually noticed this earlier too, now that I've got the gulp release out of the way, I'll look at getting a hotfix out for a few of these issues that have popped up.

Similarly, I noticed more false positives in this example as well for the declarations-before-nesting rule.
In general, it seems to confuse variables and properties.  It seems to treat any text that ends with a : as a property.
@mixin sprite-images($context, $image-path, $vertical-offset, $list) {
    // sass-lint:disable-block declarations-before-nesting
    #{$context} {
        background-image: url('#{$image-path}?v5');
    }

    $i: 0;   // <-- violation reported here

    @each $item in $list {
        #{$context}#{$context}_#{$item} {
            background-position: 0 $i;
        }

        $i: $i - $vertical-offset;  // <-- violation reported here
    }
}`

authors: DanPurdy chrismbarr

repo: sasstools/sass-lint